Class: Roast::Cogs::Cmd::Output
- Inherits:
-
Roast::Cog::Output
- Object
- Roast::Cog::Output
- Roast::Cogs::Cmd::Output
- Includes:
- Roast::Cog::Output::WithJson, Roast::Cog::Output::WithNumber, Roast::Cog::Output::WithText
- Defined in:
- lib/roast/cogs/cmd.rb
Overview
Output from running the cmd cog
Contains the standard output, standard error, and exit status from the executed command. Includes JSON and text parsing capabilities via ‘WithJson` and `WithText` modules.
Instance Attribute Summary collapse
-
#err ⇒ Object
readonly
The standard error (STDERR) from the command.
-
#out ⇒ Object
readonly
The standard output (STDOUT) from the command.
-
#status ⇒ Object
readonly
The exit status of the command process.
Instance Method Summary collapse
-
#initialize(out, err, status) ⇒ Output
constructor
: ( String, String, Process::Status) -> void.
Methods included from Roast::Cog::Output::WithText
Methods included from Roast::Cog::Output::WithNumber
#float, #float!, #integer, #integer!
Constructor Details
#initialize(out, err, status) ⇒ Output
: ( String, String, Process::Status) -> void
259 260 261 262 263 264 |
# File 'lib/roast/cogs/cmd.rb', line 259 def initialize(out, err, status) super() @out = out #: String @err = err #: String @status = status #: Process::Status end |
Instance Attribute Details
#err ⇒ Object (readonly)
The standard error (STDERR) from the command
: String
251 252 253 |
# File 'lib/roast/cogs/cmd.rb', line 251 def err @err end |
#out ⇒ Object (readonly)
The standard output (STDOUT) from the command
: String
246 247 248 |
# File 'lib/roast/cogs/cmd.rb', line 246 def out @out end |
#status ⇒ Object (readonly)
The exit status of the command process
: Process::Status
256 257 258 |
# File 'lib/roast/cogs/cmd.rb', line 256 def status @status end |