Class: Pack::RB::Launcher

Inherits:
Object
  • Object
show all
Defined in:
lib/pack/rb/launcher.rb

Defined Under Namespace

Classes: Error

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Launcher

Returns a new instance of Launcher.



20
21
22
# File 'lib/pack/rb/launcher.rb', line 20

def initialize(argv)
  @argv = argv
end

Class Method Details

.run(argv = ARGV) ⇒ Object



15
16
17
# File 'lib/pack/rb/launcher.rb', line 15

def run(argv = ARGV)
  new(argv).run
end

Instance Method Details

#runObject



24
25
26
27
28
29
# File 'lib/pack/rb/launcher.rb', line 24

def run
  binary = ensure_binary!
  exec(binary, *@argv)
rescue SystemCallError => e
  raise Error, "failed to launch pack binary: #{e.message}"
end