Class: Arel::Nodes::Comment

Inherits:
Node show all
Defined in:
activerecord/lib/arel/nodes/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#and, #not, #or, #to_sql

Methods included from FactoryMethods

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

Constructor Details

#initialize(values) ⇒ Comment

Returns a new instance of Comment.



8
9
10
11
# File 'activerecord/lib/arel/nodes/comment.rb', line 8

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

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values



6
7
8
# File 'activerecord/lib/arel/nodes/comment.rb', line 6

def values
  @values
end

Instance Method Details

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

Returns:

  • (Boolean)


22
23
24
25
# File 'activerecord/lib/arel/nodes/comment.rb', line 22

def eql?(other)
  self.class == other.class &&
    self.values == other.values
end

#hashObject



18
19
20
# File 'activerecord/lib/arel/nodes/comment.rb', line 18

def hash
  [@values].hash
end

#initialize_copy(other) ⇒ Object



13
14
15
16
# File 'activerecord/lib/arel/nodes/comment.rb', line 13

def initialize_copy(other)
  super
  @values = @values.clone
end