Module: Distillery

Defined in:
lib/distillery.rb,
lib/distillery/version.rb,
lib/distillery/document.rb

Defined Under Namespace

Classes: Document

Constant Summary collapse

ROOT =
File.dirname(__FILE__)
VERSION =
"0.4.1"

Class Method Summary collapse

Class Method Details

.distill(str, options = {}) ⇒ Object

Distills the HTMl document string to just the conent portion.

Parameters:

  • str (String)

    The HTML document to distill as a string.

  • options (Hash) (defaults to: {})

    Distillation options

Options Hash (options):

  • :dirty (Symbol)

    Do not clean the content element HTML



12
13
14
# File 'lib/distillery.rb', line 12

def self.distill(str, options = {})
  Document.new(str).distill!(options)
end