Module: PlainQuery::ClassMethods

Defined in:
lib/plain_query/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#call(relation = model&.all, options = {}) ⇒ Object



3
4
5
# File 'lib/plain_query/class_methods.rb', line 3

def call(relation = model&.all, options = {})
  new(relation, options).exec_query
end

#query_step(step_name, params = {}) ⇒ Object



11
12
13
# File 'lib/plain_query/class_methods.rb', line 11

def query_step(step_name, params = {})
  steps << [step_name, params]
end

#stepsObject



7
8
9
# File 'lib/plain_query/class_methods.rb', line 7

def steps
  @steps ||= []
end