Launchy::Detect::Runner::Windows


 The list of known runners

Public Instance Methods

all_args( cmd, *args ) click to toggle source
    # File lib/launchy/detect/runner.rb, line 73
73:       def all_args( cmd, *args )
74:         args = [ 'cmd', '/c', *shell_commands( cmd, *args ) ]
75:         Launchy.log "Windows: all_args => #{args.inspect}"
76:         return args
77:       end
dry_run( cmd, *args ) click to toggle source
    # File lib/launchy/detect/runner.rb, line 79
79:       def dry_run( cmd, *args )
80:         all_args( cmd, *args ).join(" ")
81:       end
shell_commands( cmd, *args ) click to toggle source

escape the reserved shell characters in windows command shell technet.microsoft.com/en-us/library/cc723564.aspx

    # File lib/launchy/detect/runner.rb, line 85
85:       def shell_commands( cmd, *args )
86:         cmdline = [ cmd.shellsplit ]
87:         cmdline << args.flatten.collect { |a| a.to_s.gsub(/([&|()<>^])/, "^\\1") }
88:         return commandline_normalize( cmdline )
89:       end
wet_run( cmd, *args ) click to toggle source
    # File lib/launchy/detect/runner.rb, line 91
91:       def wet_run( cmd, *args )
92:         system( *all_args( cmd, *args ) )
93:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.