Class: SyntaxTree::Index::FileComments
- Inherits:
-
Object
- Object
- SyntaxTree::Index::FileComments
- Defined in:
- lib/syntax_tree/index.rb
Overview
When you’re using the instruction sequence backend, this class is used to lazily parse comments out of the source code.
Defined Under Namespace
Classes: FileSource, Parser, StringSource
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #comments ⇒ Object
-
#initialize(source) ⇒ FileComments
constructor
A new instance of FileComments.
Constructor Details
#initialize(source) ⇒ FileComments
Returns a new instance of FileComments.
139 140 141 |
# File 'lib/syntax_tree/index.rb', line 139 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
137 138 139 |
# File 'lib/syntax_tree/index.rb', line 137 def source @source end |