Class: Arel::Nodes::TypeCast

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/extensions/type_cast.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#to_sql_and_binds

Constructor Details

#initialize(arg, type_name) ⇒ TypeCast

Returns a new instance of TypeCast.



11
12
13
14
# File 'lib/arel/extensions/type_cast.rb', line 11

def initialize(arg, type_name)
  @arg = arg
  @type_name = type_name
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.



8
9
10
# File 'lib/arel/extensions/type_cast.rb', line 8

def arg
  @arg
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



9
10
11
# File 'lib/arel/extensions/type_cast.rb', line 9

def type_name
  @type_name
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/arel/extensions/type_cast.rb', line 16

def ==(other)
  self.class == other.class && arg == other.arg && type_name == other.type_name
end