class RBS::Types::Alias

Attributes

location[R]
name[R]

Public Class Methods

new(name:, location:) click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 301
def initialize(name:, location:)
  @name = name
  @location = location
end

Public Instance Methods

==(other) click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 306
def ==(other)
  other.is_a?(Alias) && other.name == name
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 312
def hash
  self.class.hash ^ name.hash
end
map_type_name() { |name, location, self| ... } click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 329
def map_type_name
  Alias.new(
    name: yield(name, location, self),
    location: location
  )
end
to_json(state = _ = nil) click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 319
def to_json(state = _ = nil)
  { class: :alias, name: name, location: location }.to_json(state)
end
to_s(level = 0) click to toggle source
# File rbs-1.4.0/lib/rbs/types.rb, line 323
def to_s(level = 0)
  name.to_s
end