Class: Arel::Nodes::NamedWindow
- Defined in:
- lib/arel/nodes/window.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Window
#framing, #orders, #partitions
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(name) ⇒ NamedWindow
constructor
A new instance of NamedWindow.
- #initialize_copy(other) ⇒ Object
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.
69 70 71 72 |
# File 'lib/arel/nodes/window.rb', line 69 def initialize name super() @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
67 68 69 |
# File 'lib/arel/nodes/window.rb', line 67 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
83 84 85 |
# File 'lib/arel/nodes/window.rb', line 83 def eql? other super && self.name == other.name end |
#hash ⇒ Object
79 80 81 |
# File 'lib/arel/nodes/window.rb', line 79 def hash super ^ @name.hash end |
#initialize_copy(other) ⇒ Object
74 75 76 77 |
# File 'lib/arel/nodes/window.rb', line 74 def initialize_copy other super @name = other.name.clone end |