Class: Frap::Generators::Config

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/frap/generators/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



9
10
11
# File 'lib/frap/generators/config.rb', line 9

def self.source_root
  File.dirname(__FILE__) + '/templates'
end

Instance Method Details

#configure_directoriesObject



13
14
15
# File 'lib/frap/generators/config.rb', line 13

def configure_directories
  invoke :create_app_dir
end

#create_app_dirObject



17
18
19
20
# File 'lib/frap/generators/config.rb', line 17

def create_app_dir
  empty_directory(name)
  invoke :create_config_file
end

#create_config_fileObject



22
23
24
# File 'lib/frap/generators/config.rb', line 22

def create_config_file
  template('config.erb', "#{name}/config.yml")
end