Class: ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ResultUnmock Private

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_stubbed_results/entities/result_unmock.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

#initialize(service_class: nil, arguments: nil) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Since:

  • 1.0.0



23
24
25
26
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/result_unmock.rb', line 23

def initialize(service_class: nil, arguments: nil)
  @service_class = service_class
  @arguments = arguments
end

Instance Method Details

#==(other) ⇒ Boolean?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



55
56
57
58
59
60
61
62
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/result_unmock.rb', line 55

def ==(other)
  return unless other.instance_of?(self.class)

  return false if service_class != other.service_class
  return false if arguments != other.arguments

  true
end

#for(service_class, arguments) ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ResultUnmock

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/result_unmock.rb', line 33

def for(service_class, arguments)
  self.class.new(service_class: service_class, arguments: arguments)
end

#registerConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ResultUnmock Also known as: apply

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
43
44
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/result_unmock.rb', line 40

def register
  Commands::DeleteServiceStubbedResult[service: service_class, arguments: arguments]

  self
end