Class: ParadeDB::Arel::Nodes::TypeCast
- Inherits:
-
Arel::Nodes::Node
- Object
- Arel::Nodes::Node
- ParadeDB::Arel::Nodes::TypeCast
- Defined in:
- lib/parade_db/arel/nodes.rb
Instance Attribute Summary collapse
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
-
#type_sql ⇒ Object
readonly
Returns the value of attribute type_sql.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(expr, type_sql) ⇒ TypeCast
constructor
A new instance of TypeCast.
Constructor Details
#initialize(expr, type_sql) ⇒ TypeCast
Returns a new instance of TypeCast.
150 151 152 153 |
# File 'lib/parade_db/arel/nodes.rb', line 150 def initialize(expr, type_sql) @expr = expr @type_sql = type_sql end |
Instance Attribute Details
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
148 149 150 |
# File 'lib/parade_db/arel/nodes.rb', line 148 def expr @expr end |
#type_sql ⇒ Object (readonly)
Returns the value of attribute type_sql.
148 149 150 |
# File 'lib/parade_db/arel/nodes.rb', line 148 def type_sql @type_sql end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
159 160 161 162 163 |
# File 'lib/parade_db/arel/nodes.rb', line 159 def eql?(other) self.class == other.class && expr == other.expr && type_sql == other.type_sql end |
#hash ⇒ Object
155 156 157 |
# File 'lib/parade_db/arel/nodes.rb', line 155 def hash [self.class, expr, type_sql].hash end |