Class: Rulex::Tex::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/rulex/tex/reader.rb

Instance Method Summary collapse

Constructor Details

#initializeReader

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_aObject Also known as: export



19
20
21
# File 'lib/rulex/tex/reader.rb', line 19

def to_a
  @content
end