Class: Launchy::Detect::Runner::Windows

Inherits:
Launchy::Detect::Runner show all
Defined in:
lib/launchy/detect/runner.rb

Overview


The list of known runners


Instance Method Summary collapse

Methods inherited from Launchy::Detect::Runner

#commandline_normalize, detect, #run

Methods included from Launchy::DescendantTracker

#children, #find_child, #inherited

Instance Method Details

#dry_run(cmd, *args) ⇒ Object


56
57
58
# File 'lib/launchy/detect/runner.rb', line 56

def dry_run( cmd, *args )
  "cmd /c #{shell_commands( cmd, args).join(" " )}"
end

#shell_commands(cmd, args) ⇒ Object


60
61
62
63
64
# File 'lib/launchy/detect/runner.rb', line 60

def shell_commands( cmd, args )
  cmdline = [ cmd ]
  cmdline << args.collect { |a| a.to_s.gsub("&", "^&") }
  return commandline_normalize( cmdline )
end

#wet_run(cmd, *args) ⇒ Object


66
67
68
# File 'lib/launchy/detect/runner.rb', line 66

def wet_run( cmd, *args )
  system( 'cmd', '/c', *shell_commands( cmd, *args ) )
end