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
# File 'app/services/keys/base_service.rb', line 7

def initialize(user, params = {})
  @user, @params = user, 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


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

def notification_service
  NotificationService.new
end