File: gs_alone.rb

package info (click to toggle)
ruby-rghost 0.9.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: ruby: 3,374; makefile: 6; sh: 1
file content (17 lines) | stat: -rw-r--r-- 468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class RGhost::GSAlone # :nodoc:
  def initialize(params, debug = false)
    @params = params.dup
    @params[0] = " " # Get rid of the "gs" command from RGhost::Config::GS[:default_params]
    @debug = debug
  end

  def run
    cmd = @params.join(" ")
    unless File.exist?(RGhost::Config::GS[:path].to_s)
      RGhost::Config.config_platform
    end
    r = system(RGhost::Config::GS[:path] + cmd)
    puts RGhost::Config::GS[:path] + cmd if @debug
    r
  end
end