Class: Services::InvokeServiceContext
- Inherits:
-
Object
- Object
- Services::InvokeServiceContext
- Defined in:
- app/contexts/services/invoke_service_context.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(service) ⇒ InvokeServiceContext
constructor
A new instance of InvokeServiceContext.
Constructor Details
#initialize(service) ⇒ InvokeServiceContext
Returns a new instance of InvokeServiceContext.
10 11 12 13 |
# File 'app/contexts/services/invoke_service_context.rb', line 10 def initialize(service) @service = service @service.extend Services::ServiceInvoker end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
4 5 6 |
# File 'app/contexts/services/invoke_service_context.rb', line 4 def service @service end |
Class Method Details
.call(service) ⇒ Object
6 7 8 |
# File 'app/contexts/services/invoke_service_context.rb', line 6 def self.call(service) InvokeServiceContext.new(service).call end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'app/contexts/services/invoke_service_context.rb', line 15 def call service.invoke end |