Class: Nonnative::System
- Inherits:
-
Object
- Object
- Nonnative::System
- Defined in:
- lib/nonnative/system.rb
Instance Method Summary collapse
-
#initialize(process) ⇒ System
constructor
A new instance of System.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(process) ⇒ System
Returns a new instance of System.
5 6 7 8 |
# File 'lib/nonnative/system.rb', line 5 def initialize(process) @process = process @started = false end |
Instance Method Details
#start ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/nonnative/system.rb', line 10 def start unless started @pid = spawn(process.command, %i[out err] => [process.file, 'a']) @started = true end pid end |