Class: NotificationService::Async
- Inherits:
-
Object
- Object
- NotificationService::Async
- Defined in:
- app/services/notification_service.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(parent) ⇒ Async
constructor
A new instance of Async.
- #method_missing(meth, *args) ⇒ Object
Constructor Details
#initialize(parent) ⇒ Async
Returns a new instance of Async.
34 35 36 |
# File 'app/services/notification_service.rb', line 34 def initialize(parent) @parent = parent end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
38 39 40 41 42 |
# File 'app/services/notification_service.rb', line 38 def method_missing(meth, *args) return super unless parent.respond_to?(meth) MailScheduler::NotificationServiceWorker.perform_async(meth.to_s, *args) end |
Instance Attribute Details
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
30 31 32 |
# File 'app/services/notification_service.rb', line 30 def parent @parent end |