Class: ConfCtl::HealthChecks::RunCommand

Inherits:
Base
  • Object
show all
Defined in:
lib/confctl/health_checks/run_command.rb

Defined Under Namespace

Classes: Command, Output

Instance Attribute Summary

Attributes inherited from Base

#errors, #machine

Instance Method Summary collapse

Methods inherited from Base

#message, #run, #successful?

Constructor Details

#initialize(machine, command, remote:) ⇒ RunCommand

Returns a new instance of RunCommand.

Parameters:



102
103
104
105
106
# File 'lib/confctl/health_checks/run_command.rb', line 102

def initialize(machine, command, remote:)
  super(machine)
  @command = command
  @remote = remote
end

Instance Method Details

#descriptionObject



108
109
110
111
112
113
114
# File 'lib/confctl/health_checks/run_command.rb', line 108

def description
  if @command.description.empty?
    @command.to_s
  else
    @command.description
  end
end