Class: Services::CompleteSltcRegistrationProcessContext

Inherits:
Object
  • Object
show all
Defined in:
app/contexts/services/complete_sltc_registration_process_context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(registration, params) ⇒ CompleteSltcRegistrationProcessContext

Returns a new instance of CompleteSltcRegistrationProcessContext.



11
12
13
14
15
# File 'app/contexts/services/complete_sltc_registration_process_context.rb', line 11

def initialize(registration, params)
  @registration = registration
  @params = params
  @registration.extend Services::SltcRegistrationCompleter
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



5
6
7
# File 'app/contexts/services/complete_sltc_registration_process_context.rb', line 5

def params
  @params
end

#registrationObject

Returns the value of attribute registration.



5
6
7
# File 'app/contexts/services/complete_sltc_registration_process_context.rb', line 5

def registration
  @registration
end

Class Method Details

.call(registration, params) ⇒ Object



7
8
9
# File 'app/contexts/services/complete_sltc_registration_process_context.rb', line 7

def self.call(registration, params)
  CompleteSltcRegistrationProcessContext.new(registration, params).call
end

Instance Method Details

#callObject



17
18
19
# File 'app/contexts/services/complete_sltc_registration_process_context.rb', line 17

def call
  registration.complete(params)
end