Class: PagerdutyCli::Resolve
- Inherits:
-
Object
- Object
- PagerdutyCli::Resolve
- Includes:
- Common
- Defined in:
- lib/pagerduty_cli/resolve.rb
Overview
Send a resolve to PagerDuty.
Constant Summary
Constants included from Common
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Resolve
constructor
A new instance of Resolve.
- #send_resolve ⇒ Object
Methods included from Common
#croak, #incident_file, #incident_key, #load_data, #parse_common_options, #require_event, #warn
Constructor Details
#initialize(args) ⇒ Resolve
Returns a new instance of Resolve.
5 6 7 8 9 10 |
# File 'lib/pagerduty_cli/resolve.rb', line 5 def initialize(args) @me = 'pagerduty_resolve' parse_opts(args) require_event load_data end |
Class Method Details
.resolve(args) ⇒ Object
12 13 14 |
# File 'lib/pagerduty_cli/resolve.rb', line 12 def self.resolve(args) new(args).send_resolve end |
Instance Method Details
#send_resolve ⇒ Object
16 17 18 19 |
# File 'lib/pagerduty_cli/resolve.rb', line 16 def send_resolve Pagerduty.new(@api_key).get_incident(incident_key).resolve remove_incident_file end |