Class: Pubnub::Leave
- Inherits:
-
SingleEvent
- Object
- Event
- SingleEvent
- Pubnub::Leave
- Includes:
- Celluloid, Validator::Leave
- Defined in:
- lib/pubnub/events/leave.rb
Overview
Holds leave functionality
Instance Attribute Summary
Attributes inherited from Event
#callback, #channel, #fresh_clone, #given_options, #group, #idle_timeout, #open_timeout, #origin, #presence_callback, #read_timeout, #ssl, #state, #wildcard_channel
Instance Method Summary collapse
- #fire ⇒ Object
-
#initialize(options, app) ⇒ Leave
constructor
A new instance of Leave.
Methods included from Validator::Leave
#validate!, #validate_channel_and_group!
Methods included from Validator::CommonValidator
#validate_origin, #validate_publish_key, #validate_subscribe_key
Methods inherited from Event
#finalized?, #send_request, #sync?, #uri
Constructor Details
#initialize(options, app) ⇒ Leave
Returns a new instance of Leave.
8 9 10 11 |
# File 'lib/pubnub/events/leave.rb', line 8 def initialize(, app) @event = :leave super end |
Instance Method Details
#fire ⇒ Object
13 14 15 16 17 |
# File 'lib/pubnub/events/leave.rb', line 13 def fire @app.subscriber.remove_subscription(self) @app.subscriber.reset super end |