Class: Savory::Theme::BOM

Inherits:
Object
  • Object
show all
Defined in:
lib/savory/theme/bom.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(theme) ⇒ BOM

Returns a new instance of BOM.



7
8
9
10
11
12
# File 'lib/savory/theme/bom.rb', line 7

def initialize(theme)
  @theme = theme
  @layout = @theme.layout
  @base = @theme.res_home
  @bom = {}
end

Class Method Details

.create!(theme) ⇒ Object



29
30
31
# File 'lib/savory/theme/bom.rb', line 29

def create!(theme)
  self.new(theme).create
end

Instance Method Details

#cleanObject



24
25
26
# File 'lib/savory/theme/bom.rb', line 24

def clean
  File.unlink(bom_file_path) if File.exists?(bom_file_path)
end

#createObject



14
15
16
17
18
19
20
21
22
# File 'lib/savory/theme/bom.rb', line 14

def create
  @theme.layout.prepare(:bom, @base)

  images
  javascripts
  stylesheets

  write!
end