Class: RBS::AST::Ruby::Annotations::AliasAnnotation
- Defined in:
- lib/rbs/ast/ruby/annotations.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#keyword_location ⇒ Object
readonly
Returns the value of attribute keyword_location.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#type_name_location ⇒ Object
readonly
Returns the value of attribute type_name_location.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:) ⇒ AliasAnnotation
constructor
A new instance of AliasAnnotation.
- #map_type_name ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:) ⇒ AliasAnnotation
Returns a new instance of AliasAnnotation.
46 47 48 49 50 51 |
# 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 ⇒ Object (readonly)
Returns the value of attribute keyword_location.
44 45 46 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 44 def keyword_location @keyword_location end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
44 45 46 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 44 def type_name @type_name end |
#type_name_location ⇒ Object (readonly)
Returns the value of attribute type_name_location.
44 45 46 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 44 def type_name_location @type_name_location end |
Instance Method Details
#map_type_name ⇒ Object
53 54 55 56 57 58 59 60 61 |
# 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 |