Class: Patriarch::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Patriarch::Generators::InstallGenerator
- Defined in:
- lib/generators/patriarch/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#build_initializer ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/generators/patriarch/install_generator.rb', line 18 def build_initializer create_file "config/initializers/patriarch.rb" do "require 'patriarch'\n\n"+ "load File.expand_path('../../../lib/patriarch/behaviours.rb', __FILE__)\n" + "load File.expand_path('../../../lib/patriarch/services.rb', __FILE__)" end end |
#copy_compulsory_files ⇒ Object
13 14 15 16 |
# File 'lib/generators/patriarch/install_generator.rb', line 13 def copy_compulsory_files copy_file "empty_behaviours_declaration.rb", "lib/patriarch/behaviours.rb" copy_file "empty_services_declaration.rb", "lib/patriarch/services.rb" end |
#init_directories ⇒ Object
9 10 11 |
# File 'lib/generators/patriarch/install_generator.rb', line 9 def init_directories copy_file "empty_behaviours_declaration.rb", "lib/patriarch/behaviours.rb" end |