Class: BusinessTime::Generators::ConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- BusinessTime::Generators::ConfigGenerator
- Defined in:
- lib/generators/business_time/config_generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.gem_root ⇒ Object
5 6 7 |
# File 'lib/generators/business_time/config_generator.rb', line 5 def self.gem_root File.("../../../..", __FILE__) end |
.source_root ⇒ Object
9 10 11 12 |
# File 'lib/generators/business_time/config_generator.rb', line 9 def self.source_root # Use the templates from the 2.3.x generator File.join(gem_root, 'rails_generators', 'business_time_config', 'templates') end |
Instance Method Details
#generate ⇒ Object
14 15 16 17 |
# File 'lib/generators/business_time/config_generator.rb', line 14 def generate template 'business_time.rb', File.join('config', 'initializers', 'business_time.rb') template 'business_time.yml', File.join('config', 'business_time.yml') end |