Class: Documentary::Parser
- Inherits:
-
Object
- Object
- Documentary::Parser
- Defined in:
- lib/documentary/parser.rb
Instance Attribute Summary collapse
-
#docblocks ⇒ Object
readonly
Returns the value of attribute docblocks.
Instance Method Summary collapse
-
#initialize(path) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(path) ⇒ Parser
Returns a new instance of Parser.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/documentary/parser.rb', line 5 def initialize(path) @path = path @docblocks = [] @line_number = 0 begin parse_file rescue Psych::SyntaxError raise Documentary::InvalidDocblock.new end end |
Instance Attribute Details
#docblocks ⇒ Object (readonly)
Returns the value of attribute docblocks.
16 17 18 |
# File 'lib/documentary/parser.rb', line 16 def docblocks @docblocks end |