Class: Stomper::SubscriptionManager::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/stomper/subscription_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fr, cb) ⇒ Subscription

Returns a new instance of Subscription.



78
79
80
81
# File 'lib/stomper/subscription_manager.rb', line 78

def initialize(fr, cb)
  @frame = fr
  @callback = cb
end

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



77
78
79
# File 'lib/stomper/subscription_manager.rb', line 77

def callback
  @callback
end

#frameObject (readonly)

Returns the value of attribute frame.



77
78
79
# File 'lib/stomper/subscription_manager.rb', line 77

def frame
  @frame
end

Instance Method Details

#call(m) ⇒ Object



84
# File 'lib/stomper/subscription_manager.rb', line 84

def call(m); @callback.call(m); end

#destinationObject



83
# File 'lib/stomper/subscription_manager.rb', line 83

def destination; @frame[:destination]; end

#idObject



82
# File 'lib/stomper/subscription_manager.rb', line 82

def id; @frame[:id]; end