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, #partitions

Instance Method Summary collapse

Methods inherited from Window

#frame, #order, #partition, #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

#initialize(name) ⇒ NamedWindow

Returns a new instance of NamedWindow.



70
71
72
73
# File 'lib/arel/nodes/window.rb', line 70

def initialize name
  super()
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



68
69
70
# File 'lib/arel/nodes/window.rb', line 68

def name
  @name
end

Instance Method Details

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

Returns:

  • (Boolean)


84
85
86
# File 'lib/arel/nodes/window.rb', line 84

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

#hashObject



80
81
82
# File 'lib/arel/nodes/window.rb', line 80

def hash
  super ^ @name.hash
end

#initialize_copy(other) ⇒ Object



75
76
77
78
# File 'lib/arel/nodes/window.rb', line 75

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