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.



88
89
90
91
# File 'lib/torque/postgresql/arel/nodes.rb', line 88

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

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



85
86
87
# File 'lib/torque/postgresql/arel/nodes.rb', line 85

def reference
  @reference
end

Instance Method Details

#as(other) ⇒ Object



93
94
95
# File 'lib/torque/postgresql/arel/nodes.rb', line 93

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