123456789_123456789_123456789_123456789_123456789_

Class: RBS::AST::Ruby::Annotations::AliasAnnotation

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base
Instance Chain:
self, Base
Inherits: RBS::AST::Ruby::Annotations::Base
Defined in: lib/rbs/ast/ruby/annotations.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(location:, prefix_location:, keyword_location:, type_name:, type_name_location:) ⇒ AliasAnnotation

[ GitHub ]

  
# File 'lib/rbs/ast/ruby/annotations.rb', line 46

def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:)
  super(location, prefix_location)
  @keyword_location = keyword_location
  @type_name = type_name
  @type_name_location = type_name_location
end

Instance Attribute Details

#keyword_location (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/ruby/annotations.rb', line 44

attr_reader :keyword_location, :type_name_location, :type_name

#type_name (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/ruby/annotations.rb', line 44

attr_reader :keyword_location, :type_name_location, :type_name

#type_name_location (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/ruby/annotations.rb', line 44

attr_reader :keyword_location, :type_name_location, :type_name

Instance Method Details

#map_type_name

[ GitHub ]

  
# File 'lib/rbs/ast/ruby/annotations.rb', line 53

def map_type_name
  self.class.new(
    location:,
    prefix_location:,
    keyword_location:,
    type_name: type_name ? yield(type_name) : nil,
    type_name_location:
  ) #: self
end