Class: Emails::BaseService
- Inherits:
-
Object
- Object
- Emails::BaseService
- Defined in:
- app/services/emails/base_service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(current_user, params = {}) ⇒ BaseService
constructor
A new instance of BaseService.
- #notification_service ⇒ Object
Constructor Details
#initialize(current_user, params = {}) ⇒ BaseService
Returns a new instance of BaseService.
7 8 9 10 11 |
# File 'app/services/emails/base_service.rb', line 7 def initialize(current_user, params = {}) @current_user = current_user @params = params.dup @user = params.delete(:user) end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
5 6 7 |
# File 'app/services/emails/base_service.rb', line 5 def current_user @current_user end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/services/emails/base_service.rb', line 5 def params @params end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'app/services/emails/base_service.rb', line 5 def user @user end |
Instance Method Details
#notification_service ⇒ Object
13 14 15 |
# File 'app/services/emails/base_service.rb', line 13 def notification_service NotificationService.new end |