Class: ActiveMessaging::Adapters::Subscription
- Inherits:
-
Object
- Object
- ActiveMessaging::Adapters::Subscription
- Defined in:
- lib/activemessaging/adapters/reliable_msg.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #add ⇒ Object
-
#initialize(destination, headers = {}, count = 1) ⇒ Subscription
constructor
A new instance of Subscription.
- #remove ⇒ Object
Constructor Details
#initialize(destination, headers = {}, count = 1) ⇒ Subscription
Returns a new instance of Subscription.
161 162 163 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 161 def initialize(destination, headers={}, count=1) @destination, @headers, @count = destination, headers, count end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
159 160 161 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 159 def count @count end |
#headers ⇒ Object
Returns the value of attribute headers.
159 160 161 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 159 def headers @headers end |
#name ⇒ Object
Returns the value of attribute name.
159 160 161 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 159 def name @name end |
Instance Method Details
#add ⇒ Object
165 166 167 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 165 def add @count += 1 end |
#remove ⇒ Object
169 170 171 |
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 169 def remove @count -= 1 end |