Class: Sevgi::Function::Shell::Result
- Inherits:
-
Struct
- Object
- Struct
- Sevgi::Function::Shell::Result
- Defined in:
- lib/sevgi/function/shell.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#errs ⇒ Object
Returns the value of attribute errs.
-
#exit_code ⇒ Object
Returns the value of attribute exit_code.
-
#outs ⇒ Object
Returns the value of attribute outs.
Class Method Summary collapse
Instance Method Summary collapse
- #all ⇒ Object
- #cmd ⇒ Object
- #err ⇒ Object
- #notok? ⇒ Boolean
- #ok? ⇒ Boolean
- #out ⇒ Object
- #outline ⇒ Object
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
21 22 23 |
# File 'lib/sevgi/function/shell.rb', line 21 def args @args end |
#errs ⇒ Object
Returns the value of attribute errs
21 22 23 |
# File 'lib/sevgi/function/shell.rb', line 21 def errs @errs end |
#exit_code ⇒ Object
Returns the value of attribute exit_code
21 22 23 |
# File 'lib/sevgi/function/shell.rb', line 21 def exit_code @exit_code end |
#outs ⇒ Object
Returns the value of attribute outs
21 22 23 |
# File 'lib/sevgi/function/shell.rb', line 21 def outs @outs end |
Class Method Details
.dummy ⇒ Object
30 |
# File 'lib/sevgi/function/shell.rb', line 30 def self.dummy = new([], [], [], 0) |
Instance Method Details
#all ⇒ Object
22 |
# File 'lib/sevgi/function/shell.rb', line 22 def all = [*outs, "\n\n", *errs].join("\n").strip |
#cmd ⇒ Object
23 |
# File 'lib/sevgi/function/shell.rb', line 23 def cmd = args.join(" ") |
#err ⇒ Object
24 |
# File 'lib/sevgi/function/shell.rb', line 24 def err = errs.join("\n") |
#notok? ⇒ Boolean
25 |
# File 'lib/sevgi/function/shell.rb', line 25 def notok? = !ok? |
#ok? ⇒ Boolean
26 |
# File 'lib/sevgi/function/shell.rb', line 26 def ok? = exit_code&.zero? |
#out ⇒ Object
27 |
# File 'lib/sevgi/function/shell.rb', line 27 def out = outs.join("\n") |
#outline ⇒ Object
28 |
# File 'lib/sevgi/function/shell.rb', line 28 def outline = outs.first |