Class: Services::InvokeServiceContext

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#serviceObject (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

#callObject



15
16
17
# File 'app/contexts/services/invoke_service_context.rb', line 15

def call
  service.invoke
end