Class: Undress::Document
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(html, options) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(html, options) ⇒ Document
Returns a new instance of Document.
23 24 25 |
# File 'lib/undress.rb', line 23 def initialize(html, ) @doc = Hpricot(html, ) end |
Class Method Details
.add_markup(name, grammar) ⇒ Object
27 28 29 30 31 |
# File 'lib/undress.rb', line 27 def self.add_markup(name, grammar) define_method "to_#{name}" do grammar.process!(@doc) end end |