Class: Stomper::SubscriptionManager::Subscription
- Inherits:
-
Object
- Object
- Stomper::SubscriptionManager::Subscription
- Defined in:
- lib/stomper/subscription_manager.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#frame ⇒ Object
readonly
Returns the value of attribute frame.
Instance Method Summary collapse
- #call(m) ⇒ Object
- #destination ⇒ Object
- #id ⇒ Object
-
#initialize(fr, cb) ⇒ Subscription
constructor
A new instance of Subscription.
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
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
77 78 79 |
# File 'lib/stomper/subscription_manager.rb', line 77 def callback @callback end |
#frame ⇒ Object (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 |
#destination ⇒ Object
83 |
# File 'lib/stomper/subscription_manager.rb', line 83 def destination; @frame[:destination]; end |
#id ⇒ Object
82 |
# File 'lib/stomper/subscription_manager.rb', line 82 def id; @frame[:id]; end |