Class: Savory::Theme::Packager::Features::Sass
- Inherits:
-
Object
- Object
- Savory::Theme::Packager::Features::Sass
- Defined in:
- lib/savory/theme/packager/features/sass.rb
Instance Method Summary collapse
- #apply(theme, options = {}) ⇒ Object
- #clean(theme) ⇒ Object
- #enabled?(theme) ⇒ Boolean
-
#initialize(packager) ⇒ Sass
constructor
A new instance of Sass.
Constructor Details
#initialize(packager) ⇒ Sass
Returns a new instance of Sass.
7 8 9 |
# File 'lib/savory/theme/packager/features/sass.rb', line 7 def initialize(packager) @packager = packager end |
Instance Method Details
#apply(theme, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/savory/theme/packager/features/sass.rb', line 15 def apply(theme, = {}) puts "Compiling with sass" out = `sass --style compressed --update ../sass:../html` # FIXME if $?.to_i != 0 puts out raise "Failed: #{$!}" end end |
#clean(theme) ⇒ Object
25 26 27 |
# File 'lib/savory/theme/packager/features/sass.rb', line 25 def clean(theme) FileUtils.rm_rf(".sass-cache", :secure => true, :verbose => @packager.verbose) end |
#enabled?(theme) ⇒ Boolean
11 12 13 |
# File 'lib/savory/theme/packager/features/sass.rb', line 11 def enabled?(theme) theme.features[:sass] end |