Class: Slappy::Commands::Generator
- Inherits:
- 
      Object
      
        - Object
- Slappy::Commands::Generator
 
- Defined in:
- lib/slappy/commands/generator.rb
Instance Method Summary collapse
Instance Method Details
#call(dir_name) ⇒ Object
| 4 5 6 7 8 9 10 11 12 13 14 15 | # File 'lib/slappy/commands/generator.rb', line 4 def call(dir_name) dir_name = './' if dir_name.nil? dir_name += '/' if !dir_name.nil? && dir_name.split('').last != '/' @target_dir = dir_name mkdir target_dir unless @target_dir.nil? mkdir scripts_dir_path mkdir lib_dir_path copy template_script_path, scripts_dir_path copy config_file_path, target_dir end |