Class: ExceptionLogger::StylescriptsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ExceptionLogger::StylescriptsGenerator
- Defined in:
- lib/generators/exception_logger/stylescripts/stylescripts_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
12 13 14 |
# File 'lib/generators/exception_logger/stylescripts/stylescripts_generator.rb', line 12 def self. "rails generate exception_logger:stylescripts [options]" end |
.source_root ⇒ Object
7 8 9 10 |
# File 'lib/generators/exception_logger/stylescripts/stylescripts_generator.rb', line 7 def self.source_root # Set source directory for the templates to the rails2 generator template directory @source_root ||= File.(File.join('..', '..', '..', '..', 'public'), File.dirname(__FILE__)) end |
Instance Method Details
#copy_files ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/generators/exception_logger/stylescripts/stylescripts_generator.rb', line 16 def copy_files empty_directory 'public/stylesheets' template 'stylesheets/exception_logger.css', 'app/assets/stylesheets/exception_logger.css' empty_directory 'public/javascripts' template 'javascripts/exception_logger.js', 'app/assets/javascripts/exception_logger.js' end |