class RBS::AST::Ruby::Annotations::ParamTypeAnnotation
Attributes
colon_location
[R]
Location
comment_location
[R]
Location?
name_location
[R]
Location
param_type
[R]
Types::t
Public Class Methods
(location: Location, prefix_location: Location, name_location: Location, colon_location: Location, param_type: Types::t, comment_location: Location?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/annotations.rb, line 259 def initialize(location:, prefix_location:, name_location:, colon_location:, param_type:, comment_location:) super(location, prefix_location) @name_location = name_location @colon_location = colon_location @param_type = param_type @comment_location = comment_location end
Calls superclass method
RBS::AST::Ruby::Annotations::Base::new
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/annotations.rb, line 267 def map_type_name(&block) self.class.new( location:, prefix_location:, name_location: name_location, colon_location: colon_location, param_type: param_type.map_type_name { yield _1 }, comment_location: comment_location ) #: self end
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/sig/ast/ruby/annotations.rbs, line 263
def name: () -> Symbol
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/annotations.rb, line 278 def type_fingerprint [ "annots/param_type", name_location.source, param_type.to_s, comment_location&.source ] end