Class: Spoom::ExecResult
- Inherits:
-
Object
- Object
- Spoom::ExecResult
- Defined in:
- lib/spoom/context/exec.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
readonly
: String?.
-
#exit_code ⇒ Object
readonly
: Integer.
-
#out ⇒ Object
readonly
: String.
-
#status ⇒ Object
readonly
: bool.
Instance Method Summary collapse
-
#initialize(out:, status:, exit_code:, err: nil) ⇒ ExecResult
constructor
: (out: String, status: bool, exit_code: Integer, ?err: String?) -> void.
-
#to_s ⇒ Object
: -> String.
Constructor Details
#initialize(out:, status:, exit_code:, err: nil) ⇒ ExecResult
: (out: String, status: bool, exit_code: Integer, ?err: String?) -> void
21 22 23 24 25 26 |
# File 'lib/spoom/context/exec.rb', line 21 def initialize(out:, status:, exit_code:, err: nil) @out = out @err = err @status = status @exit_code = exit_code end |
Instance Attribute Details
#err ⇒ Object (readonly)
: String?
12 13 14 |
# File 'lib/spoom/context/exec.rb', line 12 def err @err end |
#exit_code ⇒ Object (readonly)
: Integer
18 19 20 |
# File 'lib/spoom/context/exec.rb', line 18 def exit_code @exit_code end |
#out ⇒ Object (readonly)
: String
9 10 11 |
# File 'lib/spoom/context/exec.rb', line 9 def out @out end |
#status ⇒ Object (readonly)
: bool
15 16 17 |
# File 'lib/spoom/context/exec.rb', line 15 def status @status end |
Instance Method Details
#to_s ⇒ Object
: -> String
29 30 31 32 33 34 35 36 37 |
# File 'lib/spoom/context/exec.rb', line 29 def to_s " ########## STDOUT ##########\n \#{out.empty? ? \"<empty>\" : out}\n ########## STDERR ##########\n \#{err&.empty? ? \"<empty>\" : err}\n ########## STATUS: \#{status} ##########\n STR\nend\n" |