Class: Motion::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Motion::Generators::InstallGenerator
- Defined in:
- lib/generators/motion/install_generator.rb
Instance Method Summary collapse
- #add_client_to_application_pack ⇒ Object
- #copy_client_initializer ⇒ Object
- #copy_initializer ⇒ Object
Instance Method Details
#add_client_to_application_pack ⇒ Object
26 27 28 29 30 31 |
# File 'lib/generators/motion/install_generator.rb', line 26 def add_client_to_application_pack append_to_file( "app/javascript/packs/application.js", 'import "motion"' ) end |
#copy_client_initializer ⇒ Object
19 20 21 22 23 24 |
# File 'lib/generators/motion/install_generator.rb', line 19 def copy_client_initializer template( "motion.js", "app/javascript/motion.js" ) end |
#copy_initializer ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/motion/install_generator.rb', line 12 def copy_initializer template( "motion.rb", "config/initializers/motion.rb" ) end |