Class: Arel::Nodes::ValuesList

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/nodes/values_list.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(rows) ⇒ ValuesList

Returns a new instance of ValuesList.



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

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

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



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

def rows
  @rows
end

Instance Method Details

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

Returns:

  • (Boolean)


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

def eql? other
  self.class == other.class &&
    self.rows == other.rows
end

#hashObject



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

def hash
  @rows.hash
end