Class: Twterm::EventDispatcher::Subscription
- Inherits:
-
Object
- Object
- Twterm::EventDispatcher::Subscription
- Defined in:
- lib/twterm/event_dispatcher.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#subscriber_id ⇒ Object
readonly
Returns the value of attribute subscriber_id.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(subscriber_id, event, block) ⇒ Subscription
constructor
A new instance of Subscription.
Constructor Details
#initialize(subscriber_id, event, block) ⇒ Subscription
Returns a new instance of Subscription.
48 49 50 |
# File 'lib/twterm/event_dispatcher.rb', line 48 def initialize(subscriber_id, event, block) @subscriber_id, @event, @callback = subscriber_id, event, block end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
46 47 48 |
# File 'lib/twterm/event_dispatcher.rb', line 46 def callback @callback end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
46 47 48 |
# File 'lib/twterm/event_dispatcher.rb', line 46 def event @event end |
#subscriber_id ⇒ Object (readonly)
Returns the value of attribute subscriber_id.
46 47 48 |
# File 'lib/twterm/event_dispatcher.rb', line 46 def subscriber_id @subscriber_id end |
Instance Method Details
#==(other) ⇒ Object
52 53 54 55 56 |
# File 'lib/twterm/event_dispatcher.rb', line 52 def ==(other) self.class == other.class && subscriber_id == other.subscriber_id && event == other.event end |