Class: Docker::Cli::CommandResult
- Inherits:
-
Object
- Object
- Docker::Cli::CommandResult
- Includes:
- TR::CondUtils
- Defined in:
- lib/docker/cli/command_result.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #err_stream ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(result, out, err) ⇒ CommandResult
constructor
A new instance of CommandResult.
- #is_out_stream_empty? ⇒ Boolean
- #out_stream ⇒ Object
Constructor Details
#initialize(result, out, err) ⇒ CommandResult
Returns a new instance of CommandResult.
11 12 13 14 15 |
# File 'lib/docker/cli/command_result.rb', line 11 def initialize(result, out, err) @result = result @out = out @err = err end |
Instance Attribute Details
#err ⇒ Object (readonly)
Returns the value of attribute err.
10 11 12 |
# File 'lib/docker/cli/command_result.rb', line 10 def err @err end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
10 11 12 |
# File 'lib/docker/cli/command_result.rb', line 10 def out @out end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
10 11 12 |
# File 'lib/docker/cli/command_result.rb', line 10 def result @result end |
Instance Method Details
#err_stream ⇒ Object
25 26 27 |
# File 'lib/docker/cli/command_result.rb', line 25 def err_stream @err.join("\n") end |
#failed? ⇒ Boolean
29 30 31 32 33 34 35 |
# File 'lib/docker/cli/command_result.rb', line 29 def failed? if @result.nil? true else @result.failed? end end |
#is_out_stream_empty? ⇒ Boolean
17 18 19 |
# File 'lib/docker/cli/command_result.rb', line 17 def is_out_stream_empty? is_empty?(@out) end |
#out_stream ⇒ Object
21 22 23 |
# File 'lib/docker/cli/command_result.rb', line 21 def out_stream @out.join("\n") end |