Class: Arel::Nodes::BindParam

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/nodes/bind_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#_caller, #and, #each, #not, #or, #to_sql

Methods included from FactoryMethods

#create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower

Constructor Details

#initialize(value) ⇒ BindParam

Returns a new instance of BindParam.



7
8
9
10
# File 'lib/arel/nodes/bind_param.rb', line 7

def initialize(value)
  @value = value
  super()
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/arel/nodes/bind_param.rb', line 5

def value
  @value
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/arel/nodes/bind_param.rb', line 16

def eql?(other)
  other.is_a?(BindParam) &&
    value == other.value
end

#hashObject



12
13
14
# File 'lib/arel/nodes/bind_param.rb', line 12

def hash
  [self.class, self.value].hash
end

#nil?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/arel/nodes/bind_param.rb', line 22

def nil?
  value.nil?
end