Class: Fumoffu::Generators::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/fumoffu/generators/fumoffu_src_generator.rb

Class Method Summary collapse

Class Method Details

.copy_sourcesObject



20
21
22
23
24
# File 'lib/fumoffu/generators/fumoffu_src_generator.rb', line 20

def self.copy_sources
  cp_r "#{@@source_dir}/templates/engine/src/.",     "#{Fumoffu::Application.app_dir}/engine/src",     :verbose => false
  cp_r "#{@@source_dir}/templates/interface/src/.",  "#{Fumoffu::Application.app_dir}/interface/src",  :verbose => false
  cp_r "#{@@source_dir}/templates/engine/test/.",    "#{Fumoffu::Application.app_dir}/engine/test",    :verbose => false
end

.generateObject



4
5
6
7
8
# File 'lib/fumoffu/generators/fumoffu_src_generator.rb', line 4

def self.generate
  @@source_dir = File.dirname(__FILE__)
  generate_dirs
  copy_sources
end

.generate_dirsObject



10
11
12
13
14
15
16
17
# File 'lib/fumoffu/generators/fumoffu_src_generator.rb', line 10

def self.generate_dirs
  # We generate the containers
  mkdir_p "#{Fumoffu::Application.app_dir}/interface/src",       :verbose => false
  mkdir_p "#{Fumoffu::Application.app_dir}/engine/src",          :verbose => false
  mkdir_p "#{Fumoffu::Application.app_dir}/engine/test",         :verbose => false
  mkdir_p "#{Fumoffu::Application.app_dir}/engine/src/commons",  :verbose => false
  mkdir_p "#{Fumoffu::Application.app_dir}/engine/src/models",   :verbose => false
end