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.
182 183 184 185 |
# File 'lib/active_record/refined/ast.rb', line 182 def initialize(operand, direction) @operand = operand @direction = direction end |
Instance Attribute Details
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
180 181 182 |
# File 'lib/active_record/refined/ast.rb', line 180 def direction @direction end |
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
180 181 182 |
# File 'lib/active_record/refined/ast.rb', line 180 def operand @operand end |
Instance Method Details
#to_arel(table) ⇒ Object
187 188 189 |
# File 'lib/active_record/refined/ast.rb', line 187 def to_arel(table) to_arel_operand(operand, table).public_send(direction) end |