Class: Eyeliner::Application

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

Overview

encapsulates the application of CSS to some HTML input

Instance Method Summary collapse

Constructor Details

#initialize(eyeliner, input) ⇒ Application

Returns a new instance of Application.



40
41
42
43
44
# File 'lib/eyeliner.rb', line 40

def initialize(eyeliner, input)
  @eyeliner = eyeliner
  @input = input
  @css = @eyeliner.css
end

Instance Method Details

#applyObject



46
47
48
49
50
51
52
53
# File 'lib/eyeliner.rb', line 46

def apply
  parse_input
  extract_stylesheets
  parse_css
  map_styles_to_elements
  apply_styles_to_elements
  @doc.to_html
end