Class: Eyeliner

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

Defined Under Namespace

Classes: Application, PsuedoClassHandler, StyleRule

Constant Summary collapse

VERSION =
"0.0.6"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Eyeliner

Returns a new instance of Eyeliner.



6
7
8
9
# File 'lib/eyeliner.rb', line 6

def initialize(attributes = {})
  @css = attributes[:css] || ""
  @stylesheet_base = attributes[:stylesheet_base]
end

Instance Attribute Details

#stylesheet_baseObject

Returns the value of attribute stylesheet_base.



11
12
13
# File 'lib/eyeliner.rb', line 11

def stylesheet_base
  @stylesheet_base
end

Instance Method Details

#add_css(css) ⇒ Object



25
26
27
# File 'lib/eyeliner.rb', line 25

def add_css(css)
  @css << css
end

#apply_to(input) ⇒ Object



33
34
35
# File 'lib/eyeliner.rb', line 33

def apply_to(input)
  Application.new(self, input).apply
end

#cssObject



29
30
31
# File 'lib/eyeliner.rb', line 29

def css
  @css.dup
end