Class: AbstractNotifier::Base::ParamsProxy
- Inherits:
-
Object
- Object
- AbstractNotifier::Base::ParamsProxy
- Defined in:
- lib/abstract_notifier/base.rb
Instance Attribute Summary collapse
-
#notifier_class ⇒ Object
readonly
Returns the value of attribute notifier_class.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(notifier_class, params) ⇒ ParamsProxy
constructor
A new instance of ParamsProxy.
-
#method_missing(method_name, *args, **kwargs) ⇒ Object
rubocop:disable Style/MethodMissingSuper.
-
#respond_to_missing? ⇒ Boolean
rubocop:enable Style/MethodMissingSuper.
Constructor Details
#initialize(notifier_class, params) ⇒ ParamsProxy
Returns a new instance of ParamsProxy.
65 66 67 68 |
# File 'lib/abstract_notifier/base.rb', line 65 def initialize(notifier_class, params) @notifier_class = notifier_class @params = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, **kwargs) ⇒ Object
rubocop:disable Style/MethodMissingSuper
71 72 73 |
# File 'lib/abstract_notifier/base.rb', line 71 def method_missing(method_name, *args, **kwargs) NotificationDelivery.new(notifier_class, method_name, params:, args:, kwargs:) end |
Instance Attribute Details
#notifier_class ⇒ Object (readonly)
Returns the value of attribute notifier_class.
63 64 65 |
# File 'lib/abstract_notifier/base.rb', line 63 def notifier_class @notifier_class end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
63 64 65 |
# File 'lib/abstract_notifier/base.rb', line 63 def params @params end |
Instance Method Details
#respond_to_missing? ⇒ Boolean
rubocop:enable Style/MethodMissingSuper
76 77 78 |
# File 'lib/abstract_notifier/base.rb', line 76 def respond_to_missing?(*) notifier_class.respond_to_missing?(*) end |