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?, #member?, #null?, #start_with?
Methods inherited from Node
Constructor Details
#initialize(operand, function) ⇒ Aggregate
Returns a new instance of Aggregate.
156 157 158 159 |
# File 'lib/active_record/refined/ast.rb', line 156 def initialize(operand, function) @operand = operand @function = function end |
Instance Attribute Details
#function ⇒ Object (readonly)
Returns the value of attribute function.
154 155 156 |
# File 'lib/active_record/refined/ast.rb', line 154 def function @function end |
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
154 155 156 |
# File 'lib/active_record/refined/ast.rb', line 154 def operand @operand end |
Instance Method Details
#to_arel(table) ⇒ Object
161 162 163 |
# File 'lib/active_record/refined/ast.rb', line 161 def to_arel(table) to_arel_operand(operand, table).public_send(function) end |