Class: RQuery::OperationsGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/rquery/operation_collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right, type) ⇒ OperationsGroup

Returns a new instance of OperationsGroup.



164
165
166
167
168
169
# File 'lib/rquery/operation_collector.rb', line 164

def initialize(left, right, type)
  @ops = Array.new
  @ops << left
  @ops << right
  @type = type
end

Instance Attribute Details

#opsObject

Returns the value of attribute ops.



162
163
164
# File 'lib/rquery/operation_collector.rb', line 162

def ops
  @ops
end

#typeObject

Returns the value of attribute type.



162
163
164
# File 'lib/rquery/operation_collector.rb', line 162

def type
  @type
end

Instance Method Details

#to_sObject



171
172
173
# File 'lib/rquery/operation_collector.rb', line 171

def to_s
  RQuery::Config.adapter.send("#{type.to_s}_group", @ops)
end