module CommandHelper

Public Instance Methods

open_path(path) click to toggle source
# File lib/renuo/cli/app/command_helper.rb, line 9
def open_path(path)
  system_command = case RbConfig::CONFIG["host_os"]
                   when /mswin|mingw|cygwin/
                     "start"
                   when /darwin/
                     "open"
                   when /linux|bsd/
                     "xdg-open"
                   end
  run_command "#{system_command} #{path}"
end
run_command(command) click to toggle source
# File lib/renuo/cli/app/command_helper.rb, line 4
def run_command(command)
  say "\n#{command.yellow}"
  system command
end