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 213
def initialize(name:) @name = name end
Instance Attribute Details
#name (readonly)
[ GitHub ]# File 'lib/rbs/definition.rb', line 211
attr_reader :name
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#eql?(other)
Alias for #==.
# File 'lib/rbs/definition.rb', line 221
alias eql? ==
#hash
[ GitHub ]# File 'lib/rbs/definition.rb', line 223
def hash self.class.hash ^ name.hash end