Class: Gulp::XMLTextExtractor

Inherits:
Nokogiri::XML::SAX::Document
  • Object
show all
Defined in:
lib/gulp/document.rb

Instance Method Summary collapse

Constructor Details

#initialize(phrase_extractor) ⇒ XMLTextExtractor

Returns a new instance of XMLTextExtractor.



62
63
64
65
# File 'lib/gulp/document.rb', line 62

def initialize(phrase_extractor)
  super()
  @phrase_extractor = phrase_extractor
end

Instance Method Details

#characters(text) ⇒ Object



67
68
69
# File 'lib/gulp/document.rb', line 67

def characters(text)
  @phrase_extractor.add_text(text)
end