Class: PushToSNS::TeardownPushNotification
- Inherits:
-
Object
- Object
- PushToSNS::TeardownPushNotification
- Defined in:
- lib/push_to_sns/teardown_push_notification.rb
Instance Method Summary collapse
-
#initialize(device, configuration = PushToSNS.configuration) ⇒ TeardownPushNotification
constructor
A new instance of TeardownPushNotification.
- #perform ⇒ Object
Constructor Details
#initialize(device, configuration = PushToSNS.configuration) ⇒ TeardownPushNotification
Returns a new instance of TeardownPushNotification.
3 4 5 6 |
# File 'lib/push_to_sns/teardown_push_notification.rb', line 3 def initialize(device, configuration = PushToSNS.configuration) self.device = device self.configuration = configuration end |
Instance Method Details
#perform ⇒ Object
8 9 10 11 |
# File 'lib/push_to_sns/teardown_push_notification.rb', line 8 def perform endpoint = configuration.apply(:read_endpoint_arn, device) AWS.sns.client.delete_endpoint(endpoint_arn: endpoint) if endpoint end |