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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::DependencyContainer::Import

import

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.



68
69
70
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_type.rb', line 68

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.



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

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)


80
81
82
83
84
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_type.rb', line 80

def call
  return false unless matcher.result

  commands.is_result?(result)
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.



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

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.



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

delegate :matcher, to: :validator

#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.



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

delegate :result, to: :matcher

#stepConvenientService::Service, Symbol

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:



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

delegate :step, to: :chain