Class: ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::SetServiceStubbedResult

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(service:, arguments:, result:) ⇒ void



33
34
35
36
37
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb', line 33

def initialize(service:, arguments:, result:)
  @service = service
  @arguments = arguments
  @result = result
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



19
20
21
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb', line 19

def arguments
  @arguments
end

#resultObject (readonly)

Returns the value of attribute result.



25
26
27
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb', line 25

def result
  @result
end

#serviceObject (readonly)

Returns the value of attribute service.



13
14
15
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb', line 13

def service
  @service
end

Instance Method Details

#callConvenientService::Service::Plugins::HasJSendResult::Entities::Result



42
43
44
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb', line 42

def call
  cache.write(key, result)
end