123456789_123456789_123456789_123456789_123456789_

Class: RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation

Relationships & Source Files
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:, annotations:, method_type:) ⇒ ColonMethodTypeAnnotation

[ GitHub ]

  
# 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 (readonly)

[ GitHub ]

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

attr_reader :annotations, :method_type

#method_type (readonly)

[ GitHub ]

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

attr_reader :annotations, :method_type

Instance Method Details

#map_type_name

[ GitHub ]

  
# 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

[ GitHub ]

  
# 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