Class: CriticalPathCss::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/critical_path_css/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_config_fileObject

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_taskObject

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