Class: ActiveRecord::Refined::AST::Ordering
- Defined in:
- lib/active_record/refined/ast.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Instance Method Summary collapse
-
#initialize(operand, direction) ⇒ Ordering
constructor
A new instance of Ordering.
- #to_arel(table) ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(operand, direction) ⇒ Ordering
Returns a new instance of Ordering.
163 164 165 166 |
# File 'lib/active_record/refined/ast.rb', line 163 def initialize(operand, direction) @operand = operand @direction = direction end |
Instance Attribute Details
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
161 162 163 |
# File 'lib/active_record/refined/ast.rb', line 161 def direction @direction end |
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
161 162 163 |
# File 'lib/active_record/refined/ast.rb', line 161 def operand @operand end |
Instance Method Details
#to_arel(table) ⇒ Object
168 169 170 |
# File 'lib/active_record/refined/ast.rb', line 168 def to_arel(table) to_arel_operand(operand, table).public_send(direction) end |