Class: ExceptiontrapGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ExceptiontrapGenerator
- Defined in:
- lib/generators/exceptiontrap/exceptiontrap_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/generators/exceptiontrap/exceptiontrap_generator.rb', line 8 def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#api_key ⇒ Object
20 21 22 |
# File 'lib/generators/exceptiontrap/exceptiontrap_generator.rb', line 20 def api_key s = "#{[:api_key]}" end |
#copy_config ⇒ Object
24 25 26 27 |
# File 'lib/generators/exceptiontrap/exceptiontrap_generator.rb', line 24 def copy_config puts 'Copying config file to your app' template 'exceptiontrap.yml', 'config/exceptiontrap.yml' end |
#install ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/generators/exceptiontrap/exceptiontrap_generator.rb', line 12 def install if ![:api_key] puts 'You have to pass --api-key or create config/exceptiontrap.yml manually' exit end #copy_config end |