Class: Services::UpdateConfiguredFacilityContext
- Inherits:
-
Object
- Object
- Services::UpdateConfiguredFacilityContext
- Defined in:
- app/contexts/services/update_configured_facility_context.rb
Instance Attribute Summary collapse
-
#cf_params ⇒ Object
Returns the value of attribute cf_params.
-
#configured_facility ⇒ Object
Returns the value of attribute configured_facility.
-
#cred_params ⇒ Object
Returns the value of attribute cred_params.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configured_facility, cf_params, cred_params) ⇒ UpdateConfiguredFacilityContext
constructor
A new instance of UpdateConfiguredFacilityContext.
Constructor Details
#initialize(configured_facility, cf_params, cred_params) ⇒ UpdateConfiguredFacilityContext
Returns a new instance of UpdateConfiguredFacilityContext.
11 12 13 14 15 16 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 11 def initialize(configured_facility, cf_params, cred_params) @configured_facility = configured_facility @cf_params = cf_params @cred_params = cred_params @configured_facility.extend Services::ConfiguredFacilityUpdater end |
Instance Attribute Details
#cf_params ⇒ Object
Returns the value of attribute cf_params.
5 6 7 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 5 def cf_params @cf_params end |
#configured_facility ⇒ Object
Returns the value of attribute configured_facility.
5 6 7 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 5 def configured_facility @configured_facility end |
#cred_params ⇒ Object
Returns the value of attribute cred_params.
5 6 7 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 5 def cred_params @cred_params end |
Class Method Details
.call(configured_facility, cf_params, cred_params) ⇒ Object
7 8 9 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 7 def self.call(configured_facility, cf_params, cred_params) UpdateConfiguredFacilityContext.new(configured_facility, cf_params, cred_params).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'app/contexts/services/update_configured_facility_context.rb', line 18 def call configured_facility.update(cf_params).tap do | configured_facility | UpdateCredentialContext.call(configured_facility, cred_params) end end |