Class: Toppings::Generators::SassFileGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Toppings::Generators::SassFileGenerator
- Includes:
- Thor::Actions, Helper::SassConversionHelper, Helper::SassFileHelper
- Defined in:
- lib/toppings/generators/sass_file_generator.rb
Class Attribute Summary collapse
-
.source_root ⇒ Object
Returns the value of attribute source_root.
Instance Method Summary collapse
Methods included from Helper::SassFileHelper
Methods included from Helper::SassConversionHelper
#convert_to_scss, #load_compass_paths, #load_dependencies, #load_paths, #sass_engine_options, #valid_sass?
Class Attribute Details
.source_root ⇒ Object
Returns the value of attribute source_root.
18 19 20 |
# File 'lib/toppings/generators/sass_file_generator.rb', line 18 def source_root @source_root end |
Instance Method Details
#create_file_from_template ⇒ Object
25 26 27 28 29 30 |
# File 'lib/toppings/generators/sass_file_generator.rb', line 25 def create_file_from_template template sassy_file_name(file_name, dialect: Toppings.conf.sass.template_dialect), file_path(file_name) do |content| content if valid_sass?(content) Toppings.conf.sass.dialect == 'scss' ? convert_to_scss(content) : content end end |
#set_current_source_root ⇒ Object
21 22 23 |
# File 'lib/toppings/generators/sass_file_generator.rb', line 21 def set_current_source_root self.class.source_root = [:source_root] end |