Class: Derelicte::Inliner

Inherits:
Object
  • Object
show all
Defined in:
lib/derelicte/inliner.rb

Instance Method Summary collapse

Instance Method Details

#inline(html_str, css_str) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/derelicte/inliner.rb', line 3

def inline(html_str, css_str)
  doc = ::Derelicte.doc_from_str(html_str)
  analyzer = ::Derelicte.css_analyzer_from_str(css_str)
  job = InlinerJob.new(doc, analyzer)
  job.apply_rules_to_doc
  ::Derelicte.doc_to_str(job.doc)
end