Class: HtmlCruncher
- Inherits:
-
Object
- Object
- HtmlCruncher
- Defined in:
- lib/html_cruncher.rb,
lib/html_cruncher/version.rb
Constant Summary collapse
- VERSION =
"1.0.2"
Instance Method Summary collapse
- #crunch(source) ⇒ Object (also: #parse)
-
#initialize(handler) ⇒ HtmlCruncher
constructor
A new instance of HtmlCruncher.
Constructor Details
#initialize(handler) ⇒ HtmlCruncher
Returns a new instance of HtmlCruncher.
5 6 7 |
# File 'lib/html_cruncher.rb', line 5 def initialize(handler) @handler = handler end |
Instance Method Details
#crunch(source) ⇒ Object Also known as: parse
9 10 11 |
# File 'lib/html_cruncher.rb', line 9 def crunch(source) parse_html(source.dup.freeze, @handler) end |