Class: Believer::ScopedCommand
- Defined in:
- lib/believer/scoped_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#wheres ⇒ Object
Returns the value of attribute wheres.
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
#clone, #connection, #execute, #initialize
Constructor Details
This class inherits a constructor from Believer::Command
Instance Attribute Details
#wheres ⇒ Object
Returns the value of attribute wheres.
4 5 6 |
# File 'lib/believer/scoped_command.rb', line 4 def wheres @wheres end |
Instance Method Details
#query_attributes ⇒ Object
6 7 8 9 |
# File 'lib/believer/scoped_command.rb', line 6 def query_attributes attrs = super attrs.merge(:wheres => @wheres) end |
#where(*args) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/believer/scoped_command.rb', line 11 def where(*args) q = clone q.wheres ||= [] q.wheres << WhereClause.new(*args) q end |