class RBS::Definition::Ancestor::Singleton - rbs: Ruby Standard Library Documentation

# class RBS::Definition::Ancestor::Singleton

### Attributes

name[R]

### Public Class Methods

new(name:) click to toggle source

    # File rbs-3.8.0/lib/rbs/definition.rb, line 215
    def initialize(name:)
      @name = name
    end

### Public Instance Methods

==(other) click to toggle source

    # File rbs-3.8.0/lib/rbs/definition.rb, line 219
    def ==(other)
      other.is_a?(Singleton) && other.name == name
    end

Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source

    # File rbs-3.8.0/lib/rbs/definition.rb, line 225
    def hash
      self.class.hash ^ name.hash
    end