Class: Services::UpdateFacilityMappingContext
- Inherits:
-
Object
- Object
- Services::UpdateFacilityMappingContext
- Defined in:
- app/contexts/services/update_facility_mapping_context.rb
Instance Attribute Summary collapse
-
#facility_mapping ⇒ Object
Returns the value of attribute facility_mapping.
-
#params ⇒ Object
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(facility_mapping, params) ⇒ UpdateFacilityMappingContext
constructor
A new instance of UpdateFacilityMappingContext.
Constructor Details
#initialize(facility_mapping, params) ⇒ UpdateFacilityMappingContext
Returns a new instance of UpdateFacilityMappingContext.
11 12 13 14 15 |
# File 'app/contexts/services/update_facility_mapping_context.rb', line 11 def initialize(facility_mapping, params) @facility_mapping = facility_mapping @params = params @facility_mapping.extend Services::FacilityMappingUpdater end |
Instance Attribute Details
#facility_mapping ⇒ Object
Returns the value of attribute facility_mapping.
5 6 7 |
# File 'app/contexts/services/update_facility_mapping_context.rb', line 5 def facility_mapping @facility_mapping end |
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'app/contexts/services/update_facility_mapping_context.rb', line 5 def params @params end |
Class Method Details
.call(facility_mapping, params) ⇒ Object
7 8 9 |
# File 'app/contexts/services/update_facility_mapping_context.rb', line 7 def self.call(facility_mapping, params) UpdateFacilityMappingContext.new(facility_mapping, params).call end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'app/contexts/services/update_facility_mapping_context.rb', line 17 def call facility_mapping.update(params) end |