class RBS::AST::Ruby::Annotations::ModuleSelfAnnotation
@rbs module-self: NAME[ARGS] -- comment annotation in leading comments
@rbs module-self: _Each[String, Integer] -- comment
^^^^ -- prefix_location
^^^^^^^^^^^ -- keyword_location
^ -- colon_location
^ -- open_bracket_location
^ -- args_comma_locations[0]
^ -- close_bracket_location
^^^^^^^^^^ -- comment_location
Attributes
args_comma_locations
[R]
Array[Location]
close_bracket_location
[R]
Location?
colon_location
[R]
Location
comment_location
[R]
Location?
keyword_location
[R]
Location
open_bracket_location
[R]
Location?
Public Class Methods
(location: Location, prefix_location: Location, keyword_location: Location, colon_location: Location, name: TypeName, args: Array[Types::t], open_bracket_location: Location?, close_bracket_location: Location?, args_comma_locations: Array[Location], comment_location: Location?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.1/lib/rbs/ast/ruby/annotations.rb, line 359 def initialize(location:, prefix_location:, keyword_location:, colon_location:, name:, args:, open_bracket_location:, close_bracket_location:, args_comma_locations:, comment_location:) super(location, prefix_location) @keyword_location = keyword_location @colon_location = colon_location @name = name @args = args @open_bracket_location = open_bracket_location @close_bracket_location = close_bracket_location @args_comma_locations = args_comma_locations @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.1.1/lib/rbs/ast/ruby/annotations.rb, line 371 def map_type_name mapped_args = args.map { |type| type.map_type_name { yield _1 } } self.class.new( location:, prefix_location:, keyword_location:, colon_location:, name: yield(name), args: mapped_args, open_bracket_location:, close_bracket_location:, args_comma_locations:, comment_location: ) #: self end
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.1/lib/rbs/ast/ruby/annotations.rb, line 388 def type_fingerprint [ "annots/module_self", name.to_s, args.map(&:to_s), comment_location&.source ] end