Class: ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub Private
- Inherits:
-
Object
- Object
- ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub
- Defined in:
- lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.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.
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #initialize(service_class:) ⇒ void constructor private
- #to(result_unmock) ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceStub private
- #to_return_result_mock ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ResultUnmock private
- #with_any_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub private
- #with_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub private
- #without_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub private
Constructor Details
#initialize(service_class:) ⇒ 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.
21 22 23 24 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 21 def initialize(service_class:) @service_class = service_class @arguments = nil 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.
79 80 81 82 83 84 85 86 87 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 79 def ==(other) return unless other.instance_of?(self.class) return false if service_class != other.service_class return false if arguments != other.arguments return false if result_unmock != other.result_unmock true end |
#to(result_unmock) ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceStub
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.
60 61 62 63 64 65 66 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 60 def to(result_unmock) @result_unmock = result_unmock.for(service_class, arguments) @result_unmock.register self end |
#to_return_result_mock ⇒ 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.
71 72 73 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 71 def to_return_result_mock @result_unmock = Entities::ResultUnmock.new(service_class: service_class, arguments: arguments) end |
#with_any_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub
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.
32 33 34 35 36 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 32 def with_any_arguments(...) @arguments = nil self end |
#with_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub
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.
41 42 43 44 45 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 41 def with_arguments(...) @arguments = Support::Arguments.new(...) self end |
#without_arguments ⇒ ConvenientService::Service::Plugins::CanHaveStubbedResults::Entities::ServiceUnstub
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.
50 51 52 53 54 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/entities/service_unstub.rb', line 50 def without_arguments @arguments = Support::Arguments.null_arguments self end |