Class: ActiveMessaging::Adapters::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/activemessaging/adapters/reliable_msg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countObject

Returns the value of attribute count.



159
160
161
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 159

def count
  @count
end

#headersObject

Returns the value of attribute headers.



159
160
161
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 159

def headers
  @headers
end

#nameObject

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

#addObject



165
166
167
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 165

def add
  @count += 1
end

#removeObject



169
170
171
# File 'lib/activemessaging/adapters/reliable_msg.rb', line 169

def remove
  @count -= 1
end