Class: Services::NotifyNewRegistrationContext
- Inherits:
-
Object
- Object
- Services::NotifyNewRegistrationContext
- Defined in:
- app/contexts/services/notify_new_registration_context.rb
Instance Attribute Summary collapse
-
#registration ⇒ Object
Returns the value of attribute registration.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(registration) ⇒ NotifyNewRegistrationContext
constructor
A new instance of NotifyNewRegistrationContext.
Constructor Details
#initialize(registration) ⇒ NotifyNewRegistrationContext
Returns a new instance of NotifyNewRegistrationContext.
11 12 13 14 |
# File 'app/contexts/services/notify_new_registration_context.rb', line 11 def initialize(registration) @registration = registration @registration.extend Services::NewRegistrationNotifier end |
Instance Attribute Details
#registration ⇒ Object
Returns the value of attribute registration.
5 6 7 |
# File 'app/contexts/services/notify_new_registration_context.rb', line 5 def registration @registration end |
Class Method Details
.call(registration) ⇒ Object
7 8 9 |
# File 'app/contexts/services/notify_new_registration_context.rb', line 7 def self.call(registration) NotifyNewRegistrationContext.new(registration).call end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'app/contexts/services/notify_new_registration_context.rb', line 16 def call registration.notify end |