class Quality::RubySpawn
Spawn a ruby process
Public Class Methods
new(cmd, args)
click to toggle source
# File lib/quality/ruby_spawn.rb, line 6 def initialize(cmd, args) @cmd = cmd @args = args end
Public Instance Methods
cmd_with_ruby_hack_prefix()
click to toggle source
# File lib/quality/ruby_spawn.rb, line 19 def cmd_with_ruby_hack_prefix if defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'jruby') "jruby -S #{@cmd}" elsif RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ "#{@cmd}.bat" else @cmd end end
invocation()
click to toggle source
# File lib/quality/ruby_spawn.rb, line 11 def invocation if !@args.empty? "#{cmd_with_ruby_hack_prefix} #{@args}" else cmd_with_ruby_hack_prefix.to_s end end