Class: RBS::Inline::AST::Annotations::MethodTypeAssertion
- Defined in:
- lib/rbs/inline/ast/annotations.rb
Instance Attribute Summary collapse
-
#method_type ⇒ Object
readonly
: MethodType.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(tree, source) ⇒ MethodTypeAssertion
constructor
A new instance of MethodTypeAssertion.
-
#type_source ⇒ Object
: String.
Constructor Details
#initialize(tree, source) ⇒ MethodTypeAssertion
Returns a new instance of MethodTypeAssertion.
312 313 314 315 316 317 |
# File 'lib/rbs/inline/ast/annotations.rb', line 312 def initialize(tree, source) @source = source @tree = tree @method_type = tree.nth_method_type!(1) end |
Instance Attribute Details
#method_type ⇒ Object (readonly)
: MethodType
309 310 311 |
# File 'lib/rbs/inline/ast/annotations.rb', line 309 def method_type @method_type end |
Instance Method Details
#type_source ⇒ Object
: String
319 320 321 |
# File 'lib/rbs/inline/ast/annotations.rb', line 319 def type_source #: String method_type.location&.source || raise end |