Class: SymmetricEncryption::Generators::ConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SymmetricEncryption::Generators::ConfigGenerator
- Defined in:
- lib/rails/generators/symmetric_encryption/config/config_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/rails/generators/symmetric_encryption/config/config_generator.rb', line 8 def self.source_root @_symmetric_encryption_source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#app_name ⇒ Object
12 13 14 |
# File 'lib/rails/generators/symmetric_encryption/config/config_generator.rb', line 12 def app_name Rails::Application.subclasses.first.parent.to_s.underscore end |
#create_config_file ⇒ Object
16 17 18 |
# File 'lib/rails/generators/symmetric_encryption/config/config_generator.rb', line 16 def create_config_file template 'symmetric-encryption.yml', File.join('config', "symmetric-encryption.yml") end |