Class: RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation
- 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.
-
#star2_location ⇒ Object
readonly
Returns the value of attribute star2_location.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:) ⇒ DoubleSplatParamTypeAnnotation
constructor
A new instance of DoubleSplatParamTypeAnnotation.
- #map_type_name(&block) ⇒ Object
- #type_fingerprint ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:) ⇒ DoubleSplatParamTypeAnnotation
Returns a new instance of DoubleSplatParamTypeAnnotation.
325 326 327 328 329 330 331 332 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 325 def initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:) super(location, prefix_location) @star2_location = star2_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.
323 324 325 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 323 def colon_location @colon_location end |
#comment_location ⇒ Object (readonly)
Returns the value of attribute comment_location.
323 324 325 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 323 def comment_location @comment_location end |
#name_location ⇒ Object (readonly)
Returns the value of attribute name_location.
323 324 325 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 323 def name_location @name_location end |
#param_type ⇒ Object (readonly)
Returns the value of attribute param_type.
323 324 325 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 323 def param_type @param_type end |
#star2_location ⇒ Object (readonly)
Returns the value of attribute star2_location.
323 324 325 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 323 def star2_location @star2_location end |
Instance Method Details
#map_type_name(&block) ⇒ Object
334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 334 def map_type_name(&block) self.class.new( location:, prefix_location:, star2_location: star2_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
346 347 348 349 350 351 352 353 |
# File 'lib/rbs/ast/ruby/annotations.rb', line 346 def type_fingerprint [ "annots/double_splat_param_type", name_location&.source, param_type.to_s, comment_location&.source ] end |