Class: ScoutAgent::API::QueueCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/scout_agent/api.rb

Overview

This is a private specialization of Command that adds some validation for queue commands in order to fail faster during API calls.

Instance Attribute Summary

Attributes inherited from Command

#error_message, #exit_status

Instance Method Summary collapse

Methods inherited from Command

#finished?, #success?

Constructor Details

#initialize(mission_id_or_report_type, fields, options) ⇒ QueueCommand

Simplifies the needed parameters to be specific to queue commands. Validation is also invoked here before the command is run.



111
112
113
114
# File 'lib/scout_agent/api.rb', line 111

def initialize(mission_id_or_report_type, fields, options)
  validate(mission_id_or_report_type, fields)
  super(:queue, [mission_id_or_report_type], fields, options)
end