Class: Torque::PostgreSQL::Arel::Nodes::Cast

Inherits:
Arel::Nodes::Binary
  • Object
show all
Includes:
Arel::AliasPredication, Arel::Expressions, Arel::Math, Arel::OrderPredications, Arel::Predications
Defined in:
lib/torque/postgresql/arel/nodes.rb

Instance Method Summary collapse

Constructor Details

#initialize(left, right, array = false) ⇒ Cast

Returns a new instance of Cast.



15
16
17
18
19
# File 'lib/torque/postgresql/arel/nodes.rb', line 15

def initialize(left, right, array = false)
  right = right.to_s
  right << '[]' if array
  super left, right
end