Class: Arel::Nodes::Unary
Direct Known Subclasses
Else, Extract, Following, Grouping, Preceding, Quoted, Range, Rows, UnaryOperation, UnqualifiedColumn, With
Instance Attribute Summary collapse
-
#expr ⇒ Object
(also: #value)
Returns the value of attribute expr.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(expr) ⇒ Unary
constructor
A new instance of Unary.
Methods inherited from Node
#_caller, #and, #each, #not, #or, #to_sql
Methods included from FactoryMethods
#create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize(expr) ⇒ Unary
Returns a new instance of Unary.
8 9 10 11 |
# File 'lib/arel/nodes/unary.rb', line 8 def initialize expr super() @expr = expr end |
Instance Attribute Details
#expr ⇒ Object Also known as: value
Returns the value of attribute expr.
5 6 7 |
# File 'lib/arel/nodes/unary.rb', line 5 def expr @expr end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
17 18 19 20 |
# File 'lib/arel/nodes/unary.rb', line 17 def eql? other self.class == other.class && self.expr == other.expr end |
#hash ⇒ Object
13 14 15 |
# File 'lib/arel/nodes/unary.rb', line 13 def hash @expr.hash end |