Class: Emails::BaseService

Inherits:
Object
  • Object
show all
Defined in:
app/services/emails/base_service.rb

Direct Known Subclasses

ConfirmService, CreateService, DestroyService

Instance Attribute Summary collapse

Instance Method Summary collapse

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_userObject (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

#paramsObject (readonly)

Returns the value of attribute params.



5
6
7
# File 'app/services/emails/base_service.rb', line 5

def params
  @params
end

#userObject (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_serviceObject



13
14
15
# File 'app/services/emails/base_service.rb', line 13

def notification_service
  NotificationService.new
end