Class: Mutant::World Private
- Inherits:
-
Object
- Object
- Mutant::World
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/config.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The outer world IO objects mutant does interact with
Constant Summary collapse
- INSPECT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'#<Mutant::World>'
Instance Method Summary collapse
-
#capture_stdout(command) ⇒ Either<String,String>
private
Capture stdout of a command.
-
#inspect ⇒ String
private
Object inspection.
Instance Method Details
#capture_stdout(command) ⇒ Either<String,String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Capture stdout of a command
41 42 43 44 45 46 47 48 49 |
# File 'lib/mutant/config.rb', line 41 def capture_stdout(command) stdout, status = open3.capture2(*command, binmode: true) if status.success? Either::Right.new(stdout) else Either::Left.new("Command #{command} failed!") end end |
#inspect ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Object inspection
32 33 34 |
# File 'lib/mutant/config.rb', line 32 def inspect INSPECT end |