Class: RQuery::OperationsGroup
- Inherits:
-
Object
- Object
- RQuery::OperationsGroup
- Defined in:
- lib/rquery/operations_group.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#operations ⇒ Object
Returns the value of attribute operations.
Instance Method Summary collapse
-
#initialize(args) ⇒ OperationsGroup
constructor
A new instance of OperationsGroup.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ OperationsGroup
Returns a new instance of OperationsGroup.
5 6 7 8 9 10 11 12 |
# File 'lib/rquery/operations_group.rb', line 5 def initialize(args) @operations = [] #if the two args passed are strings make a new group #otherwise add the second arg to the previous operation group # # NOTE coupling by type assumption here @operations = args[0].instance_of?(String) ? args[0,2] : (args[0].operations << args[1]) end |
Instance Attribute Details
#operations ⇒ Object
Returns the value of attribute operations.
3 4 5 |
# File 'lib/rquery/operations_group.rb', line 3 def operations @operations end |