Class: Trickster::ThemeCopier

Inherits:
Copier
  • Object
show all
Defined in:
lib/trickster/theme_copier.rb

Instance Method Summary collapse

Methods inherited from Copier

#initialize

Constructor Details

This class inherits a constructor from Trickster::Copier

Instance Method Details

#copy_theme(theme) ⇒ Object

Copies the theme from the trickster install into the @destination_root



4
5
6
7
8
# File 'lib/trickster/theme_copier.rb', line 4

def copy_theme(theme)
  extension = %w(.css .scss).find { |extension| File.exists?(trickster_css_file(theme,extension)) }
  destination_file = File.join(@destination_root,'css','theme' + extension)
  FileUtils.cp trickster_css_file(theme,extension),destination_file
end