Class: Torque::PostgreSQL::Arel::Nodes::Ref

Inherits:
Arel::Nodes::Unary
  • Object
show all
Defined in:
lib/torque/postgresql/arel/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expr, reference = nil) ⇒ Ref

Returns a new instance of Ref.



26
27
28
29
# File 'lib/torque/postgresql/arel/nodes.rb', line 26

def initialize(expr, reference = nil)
  @reference = reference
  super expr
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



23
24
25
# File 'lib/torque/postgresql/arel/nodes.rb', line 23

def reference
  @reference
end

Instance Method Details

#as(other) ⇒ Object



31
32
33
# File 'lib/torque/postgresql/arel/nodes.rb', line 31

def as(other)
  @reference&.as(other) || super
end