Class: DevOops::Commands::RemoveScript
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- DevOops::Commands::RemoveScript
- Includes:
- Thor::Actions
- Defined in:
- lib/dev_oops/commands/remove_script.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
17 18 19 |
# File 'lib/dev_oops/commands/remove_script.rb', line 17 def self. "#{$PROGRAM_NAME} rm SCRIPT_NAME" end |
.source_root ⇒ Object
7 8 9 |
# File 'lib/dev_oops/commands/remove_script.rb', line 7 def self.source_root "#{File.dirname(__FILE__)}/../../../" end |
Instance Method Details
#remove_json ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/dev_oops/commands/remove_script.rb', line 21 def remove_json script_dir = if [:global] ScriptsLoader::GLOBAL_DIR else ScriptsLoader.script_dir(script_name) end json_path = "#{script_dir}/#{script_name}.json" sh_path = "#{script_dir}/#{script_name}.sh" remove_file json_path if File.exist?(json_path) remove_file sh_path if File.exist?(sh_path) end |