Exception: System::ProcessFailed

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/vex/base/system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd) ⇒ ProcessFailed

Returns a new instance of ProcessFailed.



5
6
7
# File 'lib/vex/base/system.rb', line 5

def initialize(cmd)
  @cmd, @exitstatus = cmd, $?.exitstatus
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



3
4
5
# File 'lib/vex/base/system.rb', line 3

def cmd
  @cmd
end

#exitstatusObject (readonly)

Returns the value of attribute exitstatus.



3
4
5
# File 'lib/vex/base/system.rb', line 3

def exitstatus
  @exitstatus
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/vex/base/system.rb', line 9

def to_s
  "exit code: #{exitstatus}"
end