Class: RBS::Inline::AST::Annotations::Inherits
- Defined in:
- lib/rbs/inline/ast/annotations.rb
Overview
‘# @rbs inherits T`
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
: Array?.
-
#super_name ⇒ Object
readonly
: TypeName?.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(tree, source) ⇒ Inherits
constructor
A new instance of Inherits.
Constructor Details
#initialize(tree, source) ⇒ Inherits
Returns a new instance of Inherits.
432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/rbs/inline/ast/annotations.rb', line 432 def initialize(tree, source) @tree = tree @source = source inherits = tree.nth_tree!(1) if super_type = inherits.nth_type(1) if super_type.is_a?(Types::ClassInstance) @super_name = super_type.name @args = super_type.args end end end |
Instance Attribute Details
#args ⇒ Object (readonly)
: Array?
429 430 431 |
# File 'lib/rbs/inline/ast/annotations.rb', line 429 def args @args end |
#super_name ⇒ Object (readonly)
: TypeName?
428 429 430 |
# File 'lib/rbs/inline/ast/annotations.rb', line 428 def super_name @super_name end |