Class: Klomp::Subscription
- Inherits:
-
Object
- Object
- Klomp::Subscription
- Defined in:
- lib/klomp/subscription.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#subscriber ⇒ Object
readonly
Returns the value of attribute subscriber.
Instance Method Summary collapse
- #call(message = nil) ⇒ Object
-
#initialize(subscriber, headers) ⇒ Subscription
constructor
A new instance of Subscription.
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
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/klomp/subscription.rb', line 3 def headers @headers end |
#subscriber ⇒ Object (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( = nil) @subscriber.call() end |