Class: ConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultOriginalService

Inherits:
Support::Command
  • Object
show all
Includes:
Support::Delegate
Defined in:
lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::Delegate::ClassMethodsForForwardable

#delegate

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(validator:) ⇒ 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.



62
63
64
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 62

def initialize(validator:)
  @validator = validator
end

Instance Attribute Details

#validatorObject (readonly)

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.



26
27
28
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 26

def validator
  @validator
end

Instance Method Details

#callBoolean

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.

Returns:

  • (Boolean)


71
72
73
74
75
76
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 71

def call
  return false unless matcher.result
  return true unless chain.used_original_service?

  result.original_service.instance_of?(original_service)
end

#chainConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Chain

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.



47
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 47

delegate :chain, to: :matcher

#matcherConvenientService::RSpec::Matchers::Classes::Results::Base

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
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 33

delegate :matcher, to: :validator

#original_serviceConvenientService::Service

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.



54
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 54

delegate :original_service, to: :chain

#resultConvenientService::Service::Plugins::HasJSendResult::Entities::Result

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
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_original_service.rb', line 40

delegate :result, to: :matcher