Class: RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation
- Defined in:
- lib/rbs/ast/ruby/annotations.rb
Instance Attribute Summary collapse
-
#colon_location ⇒ Object
readonly
Returns the value of attribute colon_location.
-
#comment_location ⇒ Object
readonly
Returns the value of attribute comment_location.
-
#name_location ⇒ Object
readonly
Returns the value of attribute name_location.
-
#param_type ⇒ Object
readonly
Returns the value of attribute param_type.
-
#star_location ⇒ Object
readonly
Returns the value of attribute star_location.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:) ⇒ SplatParamTypeAnnotation
constructor
A new instance of SplatParamTypeAnnotation.
- #map_type_name(&block) ⇒ Object
- #type_fingerprint ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:) ⇒ SplatParamTypeAnnotation
Returns a new instance of SplatParamTypeAnnotation.
291 292 293 294 295 296 297 298 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 291 def initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:) super(location, prefix_location) @star_location = star_location @name_location = name_location @colon_location = colon_location @param_type = param_type @comment_location = comment_location end |
Instance Attribute Details
#colon_location ⇒ Object (readonly)
Returns the value of attribute colon_location.
289 290 291 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 289 def colon_location @colon_location end |
#comment_location ⇒ Object (readonly)
Returns the value of attribute comment_location.
289 290 291 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 289 def comment_location @comment_location end |
#name_location ⇒ Object (readonly)
Returns the value of attribute name_location.
289 290 291 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 289 def name_location @name_location end |
#param_type ⇒ Object (readonly)
Returns the value of attribute param_type.
289 290 291 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 289 def param_type @param_type end |
#star_location ⇒ Object (readonly)
Returns the value of attribute star_location.
289 290 291 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 289 def star_location @star_location end |
Instance Method Details
#map_type_name(&block) ⇒ Object
300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 300 def map_type_name(&block) self.class.new( location:, prefix_location:, star_location: star_location, name_location: name_location, colon_location: colon_location, param_type: param_type.map_type_name { yield _1 }, comment_location: comment_location ) #: self end |
#type_fingerprint ⇒ Object
312 313 314 315 316 317 318 319 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 312 def type_fingerprint [ "annots/splat_param_type", name_location&.source, param_type.to_s, comment_location&.source ] end |