Module: PlainQuery::ClassMethods
- Defined in:
- lib/plain_query/class_methods.rb
Instance Method Summary collapse
- #call(relation = model&.all, options = {}) ⇒ Object
- #query_step(step_name, params = {}) ⇒ Object
- #steps ⇒ Object
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, = {}) new(relation, ).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 |
#steps ⇒ Object
7 8 9 |
# File 'lib/plain_query/class_methods.rb', line 7 def steps @steps ||= [] end |