class DevOops::Commands::EditScript
Public Class Methods
source_root()
click to toggle source
# File lib/dev_oops/commands/edit_script.rb, line 7 def self.source_root "#{File.dirname(__FILE__)}/../../../" end
Public Instance Methods
edit()
click to toggle source
# File lib/dev_oops/commands/edit_script.rb, line 21 def edit script_dir = if options[:global] ScriptsLoader::GLOBAL_DIR else ScriptsLoader.script_dir(script_name) end path = "#{script_dir}/#{script_name}.json" template 'templates/empty_script.tt', path unless File.exist?(path) system("#{ENV['EDITOR'] || 'vim'} #{path}") end