Class: RBS::Definition::Ancestor::Singleton
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/definition.rb |
Class Method Summary
- .new(name:) ⇒ Singleton constructor
Instance Attribute Summary
- #name readonly
Instance Method Summary
- #==(other) (also: #eql?)
-
#eql?(other)
Alias for #==.
- #hash
Constructor Details
.new(name:) ⇒ Singleton
# File 'lib/rbs/definition.rb', line 192
def initialize(name:) @name = name end
Instance Attribute Details
#name (readonly)
[ GitHub ]# File 'lib/rbs/definition.rb', line 190
attr_reader :name
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#eql?(other)
Alias for #==.
# File 'lib/rbs/definition.rb', line 200
alias eql? ==
#hash
[ GitHub ]# File 'lib/rbs/definition.rb', line 202
def hash self.class.hash ^ name.hash end