Class: FacebookLastStepService

Inherits:
ApplicationService show all
Defined in:
app/services/facebook_last_step_service.rb

Overview

typed: ignore

Instance Attribute Summary

Attributes inherited from ApplicationService

#object

Instance Method Summary collapse

Methods inherited from ApplicationService

#execute

Constructor Details

#initialize(params) ⇒ FacebookLastStepService

Returns a new instance of FacebookLastStepService.

Parameters:

  • params (Hash)

    id,
    r_code,
    phone
    



10
11
12
13
14
# File 'app/services/facebook_last_step_service.rb', line 10

def initialize(params)
  self.object = User.find(params[:id])
  object.phone = params[:phone]
  object.r_code = params[:r_code]
end

Instance Method Details

#execute!Object



16
17
18
19
20
# File 'app/services/facebook_last_step_service.rb', line 16

def execute!
  object.save!

  ServiceResult.new data: object
end