Class: Influxdb::Arel::Nodes::Unary
- Inherits:
-
Node
show all
- Defined in:
- lib/influxdb/arel/nodes/unary.rb
Constant Summary
Constants inherited
from Node
Node::ENTENSIONS
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Node
#extend, #to_sql
#and, #or
Constructor Details
#initialize(expr) ⇒ Unary
Returns a new instance of Unary.
8
9
10
11
12
|
# File 'lib/influxdb/arel/nodes/unary.rb', line 8
def initialize(expr)
super()
expr = expr.to_s if Symbol === expr
self.expr = expr
end
|
Instance Attribute Details
#expr ⇒ Object
Also known as:
value
Returns the value of attribute expr.
5
6
7
|
# File 'lib/influxdb/arel/nodes/unary.rb', line 5
def expr
@expr
end
|
Instance Method Details
#eql?(other) ⇒ Boolean
Also known as:
==
23
24
25
|
# File 'lib/influxdb/arel/nodes/unary.rb', line 23
def eql?(other)
self.class == other.class && expr == other.expr
end
|
19
20
21
|
# File 'lib/influxdb/arel/nodes/unary.rb', line 19
def hash
self.expr.hash
end
|
#initialize_copy(other) ⇒ Object
14
15
16
17
|
# File 'lib/influxdb/arel/nodes/unary.rb', line 14
def initialize_copy(other)
super
self.expr = expr.safe_clone if expr
end
|