Class: Rulex::Tex::Reader
- Inherits:
-
Object
- Object
- Rulex::Tex::Reader
- Defined in:
- lib/rulex/tex/reader.rb
Instance Method Summary collapse
-
#initialize ⇒ Reader
constructor
A new instance of Reader.
- #read(str) ⇒ Object
- #to_a ⇒ Object (also: #export)
Constructor Details
#initialize ⇒ Reader
Returns a new instance of Reader.
13 14 15 16 |
# File 'lib/rulex/tex/reader.rb', line 13 def initialize @parser = LatexParser.new @content = [] end |
Instance Method Details
#read(str) ⇒ Object
24 25 26 |
# File 'lib/rulex/tex/reader.rb', line 24 def read str @content = @parser.parse(str).node_content end |
#to_a ⇒ Object Also known as: export
19 20 21 |
# File 'lib/rulex/tex/reader.rb', line 19 def to_a @content end |