Class: Savory::Theme::Packager::Features::Compass

Inherits:
Object
  • Object
show all
Defined in:
lib/savory/theme/packager/features/compass.rb

Instance Method Summary collapse

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,  options = {})
  output_style = options.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

Returns:

  • (Boolean)


9
10
11
# File 'lib/savory/theme/packager/features/compass.rb', line 9

def enabled?(theme)
  theme.features[:compass]
end