Module: MessageQuickly::CallbackRegistry::ClassMethods
- Included in:
- MessageQuickly::CallbackRegistry
- Defined in:
- lib/message_quickly/callback_registry.rb
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
Instance Method Summary collapse
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
8 9 10 |
# File 'lib/message_quickly/callback_registry.rb', line 8 def callbacks @callbacks end |
Instance Method Details
#handler_for(webhook_name) ⇒ Object
14 15 16 |
# File 'lib/message_quickly/callback_registry.rb', line 14 def handler_for(webhook_name) @callbacks[webhook_name]&.constantize end |
#register(klass) ⇒ Object
10 11 12 |
# File 'lib/message_quickly/callback_registry.rb', line 10 def register(klass) @callbacks[klass.webhook_name] = klass.to_s end |