Class: Ntxt::Ntxt
- Inherits:
-
Object
- Object
- Ntxt::Ntxt
- Defined in:
- lib/ntxt/ntxt.rb
Overview
Root class that contains the text array that Block objects reference.
Instance Attribute Summary collapse
-
#rootBlock ⇒ Object
The root Block.
-
#text ⇒ Object
The raw text file.
Instance Method Summary collapse
-
#initialize(text) ⇒ Ntxt
constructor
Create a new Ntxt object.
-
#walkText(print, enter, exit) ⇒ Object
Calls Block#walkText.
Constructor Details
Instance Attribute Details
#rootBlock ⇒ Object
The root Block. It will contain all tags in the document and has a Block.start of 0 and a Block.offset of #text.length.
12 13 14 |
# File 'lib/ntxt/ntxt.rb', line 12 def rootBlock @rootBlock end |
#text ⇒ Object
The raw text file. This is a String.
8 9 10 |
# File 'lib/ntxt/ntxt.rb', line 8 def text @text end |
Instance Method Details
#walkText(print, enter, exit) ⇒ Object
Calls Block#walkText.
23 24 25 |
# File 'lib/ntxt/ntxt.rb', line 23 def walkText(print, enter, exit) @rootBlock.walkText(print, enter, exit) end |