Class: ActiveRecord::Refined::AST::Aggregate
- Includes:
- Predications
- Defined in:
- lib/active_record/refined/ast.rb
Instance Attribute Summary collapse
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Instance Method Summary collapse
-
#initialize(operand, function) ⇒ Aggregate
constructor
A new instance of Aggregate.
- #to_arel(table) ⇒ Object
Methods included from Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #end_with?, #in?, #include?, #like?, #null?, #start_with?
Methods inherited from Node
Constructor Details
#initialize(operand, function) ⇒ Aggregate
Returns a new instance of Aggregate.
137 138 139 140 |
# File 'lib/active_record/refined/ast.rb', line 137 def initialize(operand, function) @operand = operand @function = function end |
Instance Attribute Details
#function ⇒ Object (readonly)
Returns the value of attribute function.
135 136 137 |
# File 'lib/active_record/refined/ast.rb', line 135 def function @function end |
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
135 136 137 |
# File 'lib/active_record/refined/ast.rb', line 135 def operand @operand end |
Instance Method Details
#to_arel(table) ⇒ Object
142 143 144 |
# File 'lib/active_record/refined/ast.rb', line 142 def to_arel(table) to_arel_operand(operand, table).public_send(function) end |