class DevOops::Commands::RemoveScript

Public Class Methods

banner() click to toggle source
source_root() click to toggle source
# File lib/dev_oops/commands/remove_script.rb, line 7
def self.source_root
  "#{File.dirname(__FILE__)}/../../../"
end

Public Instance Methods

remove_json() click to toggle source
# File lib/dev_oops/commands/remove_script.rb, line 21
def remove_json
  script_dir =
    if options[: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