Class: MDOM::Parser::Reader
- Inherits:
-
Object
- Object
- MDOM::Parser::Reader
- Defined in:
- lib/mdom/parser.rb
Overview
Line-oriented block scanner. parse_blocks returns a flat array of sibmling block nodes (and nothing else), so callers don't juggle an index.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lines) ⇒ Reader
constructor
A new instance of Reader.
- #parse ⇒ Object
Constructor Details
#initialize(lines) ⇒ Reader
Returns a new instance of Reader.
60 61 62 63 |
# File 'lib/mdom/parser.rb', line 60 def initialize(lines) @lines = lines @pos = 0 end |
Class Method Details
.parse_lines(lines) ⇒ Object
69 70 71 |
# File 'lib/mdom/parser.rb', line 69 def self.parse_lines(lines) new(lines).send(:parse_blocks) end |