Class: HtmlCruncher

Inherits:
Object
  • Object
show all
Defined in:
lib/html_cruncher.rb,
lib/html_cruncher/version.rb

Constant Summary collapse

VERSION =
"1.0.1"

Instance Method Summary collapse

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