class ChupaText::Decomposers::XML::Listener
Public Class Methods
Source
# File lib/chupa-text/decomposers/xml.rb, line 58 def initialize(output) @output = output @level = 0 end
Public Instance Methods
Source
# File lib/chupa-text/decomposers/xml.rb, line 75 def cdata(content) @output << content if @level > 0 end
Source
# File lib/chupa-text/decomposers/xml.rb, line 71 def characters(text) @output << text if @level > 0 end
Source
# File lib/chupa-text/decomposers/xml.rb, line 67 def end_element(*args) @level -= 1 end
Source
# File lib/chupa-text/decomposers/xml.rb, line 63 def start_element(*args) @level += 1 end