Class: RBS::Inline::AST::Annotations::RBSAnnotation
- Defined in:
- lib/rbs/inline/ast/annotations.rb
Overview
‘# @rbs %aa %aa …`
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
: Array.
Attributes inherited from Base
Instance Method Summary collapse
-
#annotations ⇒ Object
: Array.
-
#initialize(tree, comments) ⇒ RBSAnnotation
constructor
A new instance of RBSAnnotation.
Constructor Details
#initialize(tree, comments) ⇒ RBSAnnotation
Returns a new instance of RBSAnnotation.
397 398 399 400 401 402 403 404 405 406 |
# File 'lib/rbs/inline/ast/annotations.rb', line 397 def initialize(tree, comments) @source = comments @tree = tree annots = tree.nth_tree!(1) @contents = annots.non_trivia_trees.map do |token| raise unless token.is_a?(Array) token[1] end end |
Instance Attribute Details
#contents ⇒ Object (readonly)
: Array
394 395 396 |
# File 'lib/rbs/inline/ast/annotations.rb', line 394 def contents @contents end |