Class: RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation
- Defined in:
- lib/rbs/ast/ruby/annotations.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(location:, prefix_location:, annotations:, method_type:) ⇒ ColonMethodTypeAnnotation
constructor
A new instance of ColonMethodTypeAnnotation.
- #map_type_name ⇒ Object
- #type_fingerprint ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(location:, prefix_location:, annotations:, method_type:) ⇒ ColonMethodTypeAnnotation
Returns a new instance of ColonMethodTypeAnnotation.
85 86 87 88 89 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 85 def initialize(location:, prefix_location:, annotations:, method_type:) super(location, prefix_location) @annotations = annotations @method_type = method_type end |
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
83 84 85 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 83 def annotations @annotations end |
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
83 84 85 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 83 def method_type @method_type end |
Instance Method Details
#map_type_name ⇒ Object
91 92 93 94 95 96 97 98 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 91 def map_type_name self.class.new( location:, prefix_location:, annotations: annotations, method_type: method_type.map_type {|type| type.map_type_name { yield _1 }} ) #: self end |
#type_fingerprint ⇒ Object
100 101 102 103 104 105 106 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 100 def type_fingerprint [ "annots/colon_method_type", annotations.map(&:to_s), method_type.to_s ] end |