123456789_123456789_123456789_123456789_123456789_

Class: RBS::Definition::Ancestor::Instance

Relationships & Source Files
Inherits: Object
Defined in: lib/rbs/definition.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(name:, args:, source:) ⇒ Instance

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 172

def initialize(name:, args:, source:)
  @name = name
  @args = args
  @source = source
end

Instance Attribute Details

#args (readonly)

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 170

attr_reader :name, :args, :source

#name (readonly)

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 170

attr_reader :name, :args, :source

#source (readonly)

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 170

attr_reader :name, :args, :source

Instance Method Details

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

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 178

def ==(other)
  other.is_a?(Instance) && other.name == name && other.args == args
end

#eql?(other)

Alias for #==.

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 182

alias eql? ==

#hash

[ GitHub ]

  
# File 'lib/rbs/definition.rb', line 184

def hash
  self.class.hash ^ name.hash ^ args.hash
end