Class: Eyeliner
- Inherits:
-
Object
- Object
- Eyeliner
- 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
-
#stylesheet_base ⇒ Object
Returns the value of attribute stylesheet_base.
Instance Method Summary collapse
- #add_css(css) ⇒ Object
- #apply_to(input) ⇒ Object
- #css ⇒ Object
-
#initialize(attributes = {}) ⇒ Eyeliner
constructor
A new instance of Eyeliner.
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_base ⇒ Object
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 |
#css ⇒ Object
29 30 31 |
# File 'lib/eyeliner.rb', line 29 def css @css.dup end |