Class: Slf4r::LoggingGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Slf4r::LoggingGenerator
- Defined in:
- lib/generators/slf4r/logging/logging_generator.rb
Instance Method Summary collapse
-
#setup ⇒ Object
source_root File.expand_path(‘../templates’, __FILE__).
Instance Method Details
#setup ⇒ Object
source_root File.expand_path(‘../templates’, __FILE__)
4 5 6 7 8 9 |
# File 'lib/generators/slf4r/logging/logging_generator.rb', line 4 def setup source = File.('../../templates', __FILE__) initializer "logging.rb", File.read(File.join(source, "logging.rb")) gem 'slf4r', :require => 'slf4r/logging_logger' gem "logging" end |