Class: Bulbasaur::ExtractInnerTextFromHTML
- Inherits:
-
Object
- Object
- Bulbasaur::ExtractInnerTextFromHTML
- Defined in:
- lib/bulbasaur/extracts/extract_text_from_html.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(html) ⇒ ExtractInnerTextFromHTML
constructor
A new instance of ExtractInnerTextFromHTML.
Constructor Details
#initialize(html) ⇒ ExtractInnerTextFromHTML
Returns a new instance of ExtractInnerTextFromHTML.
5 6 7 |
# File 'lib/bulbasaur/extracts/extract_text_from_html.rb', line 5 def initialize(html) @html = html end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'lib/bulbasaur/extracts/extract_text_from_html.rb', line 9 def call Nokogiri::HTML(@html).inner_text.to_s end |