Class: Aruba::Processes::InProcess::FakeKernel
- Inherits:
-
Object
- Object
- Aruba::Processes::InProcess::FakeKernel
- Defined in:
- lib/aruba/processes/in_process.rb
Overview
Fake Kernel module of ruby
Instance Attribute Summary collapse
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
Instance Method Summary collapse
- #exit(exitstatus) ⇒ Object
-
#initialize ⇒ FakeKernel
constructor
A new instance of FakeKernel.
Constructor Details
#initialize ⇒ FakeKernel
Returns a new instance of FakeKernel.
31 32 33 |
# File 'lib/aruba/processes/in_process.rb', line 31 def initialize @exitstatus = 0 end |
Instance Attribute Details
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
29 30 31 |
# File 'lib/aruba/processes/in_process.rb', line 29 def exitstatus @exitstatus end |
Instance Method Details
#exit(exitstatus) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/aruba/processes/in_process.rb', line 35 def exit(exitstatus) @exitstatus = case exitstatus when Numeric then Integer(exitstatus) when TrueClass then 0 when FalseClass then 1 else raise TypeError, "no implicit conversion of #{exitstatus.class} into Integer" end end |