Methods

Class/Module Index [+]

Quicksearch

CSSInliner

Constants

VERSION

Public Class Methods

process(html, basedir = '.') click to toggle source
# File lib/css_inliner.rb, line 10
def process(html, basedir = '.')
  # Make DOM
  doc = Nokogiri.HTML html

  # Structure CSS
  csss = find_css doc, basedir
  css_parser = CssParser::Parser.new
  csss.each {|css| css_parser.add_block! css}
  css_map = create_css_map css_parser

  # Inline CSS
  inline(doc, css_map).to_s
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.