Class: CriticalPathCss::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CriticalPathCss::InstallGenerator
- Defined in:
- lib/generators/critical_path_css/install_generator.rb
Instance Method Summary collapse
-
#copy_config_file ⇒ Object
Copy the needed configuration YAML file for generating critical CSS.
-
#copy_rake_task ⇒ Object
Copy the needed rake task for generating critical CSS.
Instance Method Details
#copy_config_file ⇒ Object
Copy the needed configuration YAML file for generating critical CSS
14 15 16 17 |
# File 'lib/generators/critical_path_css/install_generator.rb', line 14 def copy_config_file task_filename = 'critical_path_css.yml' copy_file "../../config/#{task_filename}", "config/#{task_filename}" end |
#copy_rake_task ⇒ Object
Copy the needed rake task for generating critical CSS
8 9 10 11 |
# File 'lib/generators/critical_path_css/install_generator.rb', line 8 def copy_rake_task task_filename = 'critical_path_css.rake' copy_file "../../tasks/#{task_filename}", "lib/tasks/#{task_filename}" end |