Class: ActiveMessaging::Adapters::AmazonSqs::Subscription
- Inherits:
-
Object
- Object
- ActiveMessaging::Adapters::AmazonSqs::Subscription
- Defined in:
- lib/activemessaging/adapters/asqs.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.
364 365 366 |
# File 'lib/activemessaging/adapters/asqs.rb', line 364 def initialize(destination, headers={}, count=1) @destination, @headers, @count = destination, headers, count end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
362 363 364 |
# File 'lib/activemessaging/adapters/asqs.rb', line 362 def count @count end |
#headers ⇒ Object
Returns the value of attribute headers.
362 363 364 |
# File 'lib/activemessaging/adapters/asqs.rb', line 362 def headers @headers end |
#name ⇒ Object
Returns the value of attribute name.
362 363 364 |
# File 'lib/activemessaging/adapters/asqs.rb', line 362 def name @name end |
Instance Method Details
#add ⇒ Object
368 369 370 |
# File 'lib/activemessaging/adapters/asqs.rb', line 368 def add @count += 1 end |
#remove ⇒ Object
372 373 374 |
# File 'lib/activemessaging/adapters/asqs.rb', line 372 def remove @count -= 1 end |