Class: Twterm::EventDispatcher::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/twterm/event_dispatcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#callbackObject (readonly)

Returns the value of attribute callback.



46
47
48
# File 'lib/twterm/event_dispatcher.rb', line 46

def callback
  @callback
end

#eventObject (readonly)

Returns the value of attribute event.



46
47
48
# File 'lib/twterm/event_dispatcher.rb', line 46

def event
  @event
end

#subscriber_idObject (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