Class: Swat::TestWorld::Generators::InstallGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/swat/test_world/generators/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#installObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/swat/test_world/generators/install_generator.rb', line 10

def install
  create_tw
  if ENV['with_modules']
    create_helpers
    create_methods
    gsub_file main_file, '# You can include your own modules here' do
      "require 'swat/modules/helpers.rb'\nrequire 'swat/modules/methods.rb'\ninclude Methods\n"
    end
  end
end