Class: Styleyt::ThemeGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
StyleytHelper
Defined in:
lib/generators/styleyt/theme_generator.rb

Constant Summary

Constants included from StyleytHelper

StyleytHelper::COMPILED_PREVIEW_DIRECTORY, StyleytHelper::HAML_FILES, StyleytHelper::PREVIEW_DIRECTORY, StyleytHelper::SASS_FILES, StyleytHelper::SASS_TEMPLATES_DIRECTORY

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StyleytHelper

#ask_for_theme, #available_themes, #remove_file_suffix, #src_root_dir, #theme_directory

Class Method Details

.source_rootObject



9
10
11
# File 'lib/generators/styleyt/theme_generator.rb', line 9

def self.source_root
  File.join(File.dirname(__FILE__), SASS_TEMPLATES_DIRECTORY)
end

Instance Method Details

#installObject



14
15
16
17
18
# File 'lib/generators/styleyt/theme_generator.rb', line 14

def install
  theme = ask_for_theme
  copy_default_sass
  copy_theme_sass(theme)
end