Class: Savory::Theme::Packager::Features::Compass
- Inherits:
-
Object
- Object
- Savory::Theme::Packager::Features::Compass
- Defined in:
- lib/savory/theme/packager/features/compass.rb
Instance Method Summary collapse
- #apply(theme, options = {}) ⇒ Object
- #clean(theme) ⇒ Object
- #enabled?(theme) ⇒ Boolean
-
#initialize(packager) ⇒ Compass
constructor
A new instance of Compass.
Constructor Details
#initialize(packager) ⇒ Compass
Returns a new instance of Compass.
5 6 7 |
# File 'lib/savory/theme/packager/features/compass.rb', line 5 def initialize(packager) @packager = packager end |
Instance Method Details
#apply(theme, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/savory/theme/packager/features/compass.rb', line 13 def apply(theme, = {}) output_style = .delete(:output_style) || "compressed" puts "Compiling with compass" out = `bundle exec compass compile --force -s #{output_style}` if $?.to_i != 0 puts out raise "Failed: #{$!}" end end |
#clean(theme) ⇒ Object
24 25 |
# File 'lib/savory/theme/packager/features/compass.rb', line 24 def clean(theme) end |
#enabled?(theme) ⇒ Boolean
9 10 11 |
# File 'lib/savory/theme/packager/features/compass.rb', line 9 def enabled?(theme) theme.features[:compass] end |