Class: Keys::BaseService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, params = {}) ⇒ BaseService

Returns a new instance of BaseService.



7
8
9
10
11
# File 'app/services/keys/base_service.rb', line 7

def initialize(user, params = {})
  @user = user
  @params = params
  @ip_address = @params.delete(:ip_address)
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



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

def params
  @params
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end

Instance Method Details

#notification_serviceObject



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

def notification_service
  NotificationService.new
end