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

Inherits:
Support::Command
  • Object
show all
Includes:
Support::Delegate
Defined in:
lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_message.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.



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

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.



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

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)


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

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

  casted_message.public_send(comparison_method, result.unsafe_message)
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.



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

delegate :chain, to: :matcher

#comparison_methodSymbol, String

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:

  • (Symbol, String)


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

delegate :comparison_method, to: :chain

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



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

delegate :matcher, to: :validator

#messageString

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:

  • (String)


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

delegate :message, 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.



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

delegate :result, to: :matcher