Class: Elisp2any::Commentary
- Inherits:
-
Object
- Object
- Elisp2any::Commentary
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/elisp2any/commentary.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(paragraphs) ⇒ Commentary
constructor
A new instance of Commentary.
Constructor Details
#initialize(paragraphs) ⇒ Commentary
23 24 25 |
# File 'lib/elisp2any/commentary.rb', line 23 def initialize(paragraphs) @paragraphs = paragraphs end |
Class Method Details
.scan(scanner) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/elisp2any/commentary.rb', line 7 def self.scan(scanner) pos = scanner.pos heading = Elisp2any.scan_top_heading(scanner) or return unless heading == "Commentary:" scanner.pos = pos return end Blanklines.scan(scanner) # optional paragraphs = [] while (par = Paragraph.scan(scanner)) paragraphs << par Blanklines.scan(scanner) # optional end new(paragraphs) end |