Class: Arel::Nodes::NamedWindow

Inherits:
Window show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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

#and, #equality?, #fetch_attribute, #invert, #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(name) ⇒ NamedWindow

Returns a new instance of NamedWindow.



71
72
73
74
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/window.rb', line 71

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



69
70
71
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/window.rb', line 69

def name
  @name
end

Instance Method Details

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

Returns:

  • (Boolean)


85
86
87
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/window.rb', line 85

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

#hashObject



81
82
83
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/window.rb', line 81

def hash
  super ^ @name.hash
end

#initialize_copy(other) ⇒ Object



76
77
78
79
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/window.rb', line 76

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