Sha256: 16df5ca7b25c71196628ffd654b16ef65da2aa4576760b50bddb0f5a35583b7e

Contents?: true

Size: 598 Bytes

Versions: 2

Compression:

Stored size: 598 Bytes

Contents

module Vedeu
  class Launcher
    def initialize(argv, stdin  = STDIN,
                         stdout = STDOUT,
                         stderr = STDERR,
                         kernel = Kernel)
      @argv      = argv
      @stdin     = stdin
      @stdout    = stdout
      @stderr    = stderr
      @kernel    = kernel
      @exit_code = 1
    end

    def execute!
      $stdin, $stdout, $stderr = @stdin, @stdout, @stderr

      Vedeu::Application.start

      @exit_code = 0
    ensure
      $stdin, $stdout, $stderr = STDIN, STDOUT, STDERR
      @kernel.exit(@exit_code)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.0.13 lib/vedeu/launcher.rb
vedeu-0.0.12 lib/vedeu/launcher.rb