Class: JeraPayment::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- JeraPayment::Generators::InstallGenerator
- Defined in:
- lib/generators/jera_payment/install_generator.rb
Instance Method Summary collapse
- #callback_services ⇒ Object
- #generate_migrations ⇒ Object
- #initializer_file ⇒ Object
- #locale_file ⇒ Object
Instance Method Details
#callback_services ⇒ Object
26 27 28 29 30 31 |
# File 'lib/generators/jera_payment/install_generator.rb', line 26 def callback_services copy_subscription_files copy_invoice_files copy_sub_account_files copy_withdrawal_files end |
#generate_migrations ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/generators/jera_payment/install_generator.rb', line 17 def generate_migrations case self.behavior when :invoke generate "active_record:jera_payment", "migration" when :revoke Rails::Generators.invoke "active_record:jera_payment", ["migration"], behavior: :revoke end end |
#initializer_file ⇒ Object
9 10 11 |
# File 'lib/generators/jera_payment/install_generator.rb', line 9 def initializer_file template 'jera_payment.rb', 'config/initializers/jera_payment.rb' end |
#locale_file ⇒ Object
13 14 15 |
# File 'lib/generators/jera_payment/install_generator.rb', line 13 def locale_file copy_file '../../../../config/locale/jera_payment.pt-BR.yml', 'config/locales/jera_payment.pt-BR.yml' end |