Class: ProcessWatcher::WatchStatus
- Inherits:
-
Object
- Object
- ProcessWatcher::WatchStatus
- Defined in:
- lib/process_watcher/watcher.rb
Overview
Encapsulate information returned by watcher
Constant Summary collapse
- VALID_STATUSES =
Potential outcome of watcher
[ :success, :timeout, :size_exceeded ]
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Watched process exit code or -1 if process was killed.
-
#output ⇒ Object
readonly
Watched process combined output.
-
#status ⇒ Object
readonly
One of VALID_STATUSES.
Instance Method Summary collapse
-
#initialize(status, exit_code, output) ⇒ WatchStatus
constructor
Initialize attibutes.
Constructor Details
#initialize(status, exit_code, output) ⇒ WatchStatus
Initialize attibutes
43 44 45 46 47 |
# File 'lib/process_watcher/watcher.rb', line 43 def initialize(status, exit_code, output) @status = status @exit_code = exit_code @output = output end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Watched process exit code or -1 if process was killed
39 40 41 |
# File 'lib/process_watcher/watcher.rb', line 39 def exit_code @exit_code end |
#output ⇒ Object (readonly)
Watched process combined output
40 41 42 |
# File 'lib/process_watcher/watcher.rb', line 40 def output @output end |
#status ⇒ Object (readonly)
One of VALID_STATUSES
38 39 40 |
# File 'lib/process_watcher/watcher.rb', line 38 def status @status end |