Class: HTML2TeX::BasicProcessor

Inherits:
Object
  • Object
show all
Includes:
TeX
Defined in:
lib/html2tex/basic_processor.rb

Direct Known Subclasses

HeadingProcessor, PreambleProcessor

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TeX

#tex, #tex_escape

Constructor Details

#initialize(scanner, options) ⇒ BasicProcessor

Returns a new instance of BasicProcessor.



9
10
11
12
13
# File 'lib/html2tex/basic_processor.rb', line 9

def initialize(scanner, options)
  @decoder = HTMLEntities.new
  @scanner = scanner
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/html2tex/basic_processor.rb', line 7

def options
  @options
end

#scannerObject (readonly)

Returns the value of attribute scanner.



7
8
9
# File 'lib/html2tex/basic_processor.rb', line 7

def scanner
  @scanner
end

Instance Method Details

#to_tex(buffer = "") ⇒ Object



15
16
17
18
19
20
# File 'lib/html2tex/basic_processor.rb', line 15

def to_tex(buffer="")
  while n = next_element
    buffer << n
  end
  buffer
end