Class: Klomp::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/klomp/subscription.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subscriber, headers) ⇒ Subscription

Returns a new instance of Subscription.



5
6
7
8
# File 'lib/klomp/subscription.rb', line 5

def initialize(subscriber, headers)
  @subscriber = subscriber
  @headers = headers
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



3
4
5
# File 'lib/klomp/subscription.rb', line 3

def headers
  @headers
end

#subscriberObject (readonly)

Returns the value of attribute subscriber.



3
4
5
# File 'lib/klomp/subscription.rb', line 3

def subscriber
  @subscriber
end

Instance Method Details

#call(message = nil) ⇒ Object



10
11
12
# File 'lib/klomp/subscription.rb', line 10

def call(message = nil)
  @subscriber.call(message)
end