def method_missing(name, *args, &block)
      if queries.key?(name.to_sym)
        query = queries[name.to_sym]
        query.proc = block if block_given?
        query.options = args.extract_options!
        return query
      end

      super
    end
def method_missing(name, *args, &block)
      if queries.key?(name.to_sym)
        query = queries[name.to_sym]
        query.proc = block if block_given?
        query.options = args.extract_options!
        return query
      end

      super
    end
Allow defined queries to be redefined by name, eg:
 query :main_query
 main_query { collect_records_here }