Class: Sevgi::Test::Shell::Result Private
- Inherits:
-
Data
- Object
- Data
- Sevgi::Test::Shell::Result
- Defined in:
- lib/sevgi/showcase/minitest/shell.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.
Shell command result.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
Instance Method Summary collapse
-
#cmd ⇒ String
private
Returns the command string.
-
#notok? ⇒ Boolean
private
Reports whether the command failed.
-
#ok? ⇒ Boolean
private
Reports whether the command exited successfully.
-
#outline ⇒ String?
private
Returns the first stdout line.
-
#to_s ⇒ String
private
Returns stdout as a newline-joined string.
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
14 15 16 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14 def args @args end |
#err ⇒ Object (readonly)
Returns the value of attribute err
14 15 16 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14 def err @err end |
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code
14 15 16 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14 def exit_code @exit_code end |
#out ⇒ Object (readonly)
Returns the value of attribute out
14 15 16 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14 def out @out end |
Instance Method Details
#cmd ⇒ 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.
Returns the command string.
17 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 17 def cmd = args.join(" ") |
#notok? ⇒ Boolean
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.
Reports whether the command failed.
21 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 21 def notok? = !ok? |
#ok? ⇒ Boolean
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.
Reports whether the command exited successfully.
25 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 25 def ok? = exit_code&.zero? |
#outline ⇒ 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.
Returns the first stdout line.
29 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 29 def outline = out.first |
#to_s ⇒ 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.
Returns stdout as a newline-joined string.
33 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 33 def to_s = out.join("\n") |