Class: CssPress::Css

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

Constant Summary collapse

DEFAULTS =
{ 
}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Css

Returns a new instance of Css.



9
10
11
# File 'lib/css_press/css.rb', line 9

def initialize (options = {})
  @options = DEFAULTS.merge(options)
end

Instance Method Details

#press(css) ⇒ Object



13
14
15
16
17
# File 'lib/css_press/css.rb', line 13

def press (css)
  css_in = css.respond_to?(:read) ? css.read : css.dup
  doc = CSSPool.CSS css_in
  doc.min_css
end