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