Class: ChupaText::SAXParser::Listener

Inherits:
Object
  • Object
show all
Includes:
REXML::SAX2Listener
Defined in:
lib/chupa-text/sax-parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(listener) ⇒ Listener

Returns a new instance of Listener.



139
140
141
# File 'lib/chupa-text/sax-parser.rb', line 139

def initialize(listener)
  @listener = listener
end

Instance Method Details

#cdata(content) ⇒ Object



163
164
165
# File 'lib/chupa-text/sax-parser.rb', line 163

def cdata(content)
  @listener.cdata(CGI.unescapeHTML(content))
end

#characters(text) ⇒ Object



159
160
161
# File 'lib/chupa-text/sax-parser.rb', line 159

def characters(text)
  @listener.characters(CGI.unescapeHTML(text))
end

#end_element(*args) ⇒ Object



155
156
157
# File 'lib/chupa-text/sax-parser.rb', line 155

def end_element(*args)
  @listener.end_element(*args)
end

#end_prefix_mapping(*args) ⇒ Object



147
148
149
# File 'lib/chupa-text/sax-parser.rb', line 147

def end_prefix_mapping(*args)
  @listener.end_prefix_mapping(*args)
end

#start_element(*args) ⇒ Object



151
152
153
# File 'lib/chupa-text/sax-parser.rb', line 151

def start_element(*args)
  @listener.start_element(*args)
end

#start_prefix_mapping(*args) ⇒ Object



143
144
145
# File 'lib/chupa-text/sax-parser.rb', line 143

def start_prefix_mapping(*args)
  @listener.start_prefix_mapping(*args)
end