Class: Hermes::EventHandler::Registration
- Inherits:
-
Object
- Object
- Hermes::EventHandler::Registration
- Defined in:
- lib/hermes/event_handler.rb
Instance Attribute Summary collapse
-
#consumer ⇒ Object
readonly
Returns the value of attribute consumer.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #async? ⇒ Boolean
- #consumer_config ⇒ Object
-
#initialize(handler, consumer, options = {}) ⇒ Registration
constructor
A new instance of Registration.
- #rpc? ⇒ Boolean
Constructor Details
#initialize(handler, consumer, options = {}) ⇒ Registration
Returns a new instance of Registration.
44 45 46 47 48 |
# File 'lib/hermes/event_handler.rb', line 44 def initialize(handler, consumer, = {}) @handler = handler @consumer = consumer @options = end |
Instance Attribute Details
#consumer ⇒ Object (readonly)
Returns the value of attribute consumer.
42 43 44 |
# File 'lib/hermes/event_handler.rb', line 42 def consumer @consumer end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
42 43 44 |
# File 'lib/hermes/event_handler.rb', line 42 def handler @handler end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
42 43 44 |
# File 'lib/hermes/event_handler.rb', line 42 def @options end |
Instance Method Details
#async? ⇒ Boolean
50 51 52 |
# File 'lib/hermes/event_handler.rb', line 50 def async? .fetch(:async) == true end |
#consumer_config ⇒ Object
58 59 60 |
# File 'lib/hermes/event_handler.rb', line 58 def consumer_config optons.fetch(:consumer_config) end |
#rpc? ⇒ Boolean
54 55 56 |
# File 'lib/hermes/event_handler.rb', line 54 def rpc? .fetch(:rpc) == true end |