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.



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

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.



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

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)


75
76
77
78
79
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_type.rb', line 75

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.



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

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.



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

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.



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

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:



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

delegate :step, to: :chain