Class: RBS::Inline::AST::Annotations::Application
- Defined in:
- lib/rbs/inline/ast/annotations.rb
Overview
‘#[TYPE, …, TYPE]`
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
: Array?.
Attributes inherited from Base
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#initialize(tree, source) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(tree, source) ⇒ Application
Returns a new instance of Application.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/rbs/inline/ast/annotations.rb', line 366 def initialize(tree, source) @tree = tree @source = source if ts = tree.nth_tree(0) if types = ts.nth_tree(1) @types = types.non_trivia_trees.each_slice(2).map do |type, comma| # @type break: nil case type when AST::Tree, MethodType, Array, nil break else type end end end end end |
Instance Attribute Details
#types ⇒ Object (readonly)
: Array?
363 364 365 |
# File 'lib/rbs/inline/ast/annotations.rb', line 363 def types @types end |
Instance Method Details
#complete? ⇒ Boolean
387 388 389 |
# File 'lib/rbs/inline/ast/annotations.rb', line 387 def complete? types ? true : false end |