Class: ConfCtl::HealthChecks::RunCommand::Command
- Inherits:
-
Object
- Object
- ConfCtl::HealthChecks::RunCommand::Command
- Defined in:
- lib/confctl/health_checks/run_command.rb
Instance Attribute Summary collapse
- #command ⇒ Array<String> readonly
- #cooldown ⇒ Integer readonly
- #description ⇒ String readonly
- #exit_status ⇒ Integer readonly
- #stderr ⇒ Output readonly
- #stdout ⇒ Output readonly
- #timeout ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(machine, opts) ⇒ Command
constructor
A new instance of Command.
- #to_s ⇒ Object
Constructor Details
#initialize(machine, opts) ⇒ Command
Returns a new instance of Command.
74 75 76 77 78 79 80 81 82 |
# File 'lib/confctl/health_checks/run_command.rb', line 74 def initialize(machine, opts) @description = opts['description'] @command = make_command(machine, opts['command']) @exit_status = opts['exitStatus'] @stdout = Output.new(opts['standardOutput']) @stderr = Output.new(opts['standardError']) @timeout = opts['timeout'] @cooldown = opts['cooldown'] end |
Instance Attribute Details
#command ⇒ Array<String> (readonly)
57 58 59 |
# File 'lib/confctl/health_checks/run_command.rb', line 57 def command @command end |
#cooldown ⇒ Integer (readonly)
72 73 74 |
# File 'lib/confctl/health_checks/run_command.rb', line 72 def cooldown @cooldown end |
#description ⇒ String (readonly)
54 55 56 |
# File 'lib/confctl/health_checks/run_command.rb', line 54 def description @description end |
#exit_status ⇒ Integer (readonly)
60 61 62 |
# File 'lib/confctl/health_checks/run_command.rb', line 60 def exit_status @exit_status end |
#stderr ⇒ Output (readonly)
66 67 68 |
# File 'lib/confctl/health_checks/run_command.rb', line 66 def stderr @stderr end |
#stdout ⇒ Output (readonly)
63 64 65 |
# File 'lib/confctl/health_checks/run_command.rb', line 63 def stdout @stdout end |
#timeout ⇒ Integer (readonly)
69 70 71 |
# File 'lib/confctl/health_checks/run_command.rb', line 69 def timeout @timeout end |
Instance Method Details
#to_s ⇒ Object
84 85 86 |
# File 'lib/confctl/health_checks/run_command.rb', line 84 def to_s @command.join(' ') end |