Class: Arel::Nodes::NamedWindow

Inherits:
Window show all
Defined in:
lib/arel/nodes/window.rb

Instance Attribute Summary (collapse)

Attributes inherited from Window

#framing, #orders

Instance Method Summary (collapse)

Methods inherited from Window

#frame, #order, #range, #rows

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

- (NamedWindow) initialize(name)



50
51
52
53
# File 'lib/arel/nodes/window.rb', line 50

def initialize name
  super()
  @name = name
end

Instance Attribute Details

- (Object) name

Returns the value of attribute name



48
49
50
# File 'lib/arel/nodes/window.rb', line 48

def name
  @name
end

Instance Method Details

- (Boolean) eql?(other) Also known as: ==



64
65
66
# File 'lib/arel/nodes/window.rb', line 64

def eql? other
  super && self.name == other.name
end

- (Object) hash



60
61
62
# File 'lib/arel/nodes/window.rb', line 60

def hash
  super ^ @name.hash
end

- (Object) initialize_copy(other)



55
56
57
58
# File 'lib/arel/nodes/window.rb', line 55

def initialize_copy other
  super
  @name = other.name.clone
end