Class: SmartCore::Types::Primitive::InvariantControl::Result Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/types/primitive/invariant_control/result.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.

Since:

  • 0.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invariant_control, checked_value) ⇒ 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.

Parameters:

Since:

  • 0.2.0



24
25
26
27
28
29
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 24

def initialize(invariant_control, checked_value)
  @invariant_control = invariant_control
  @checked_value = checked_value
  @chain_results = []
  @single_results = []
end

Instance Attribute Details

#chain_resultsArray<SmartCore::Types::Primitive::InvariantControl::Chain::Result> (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.



10
11
12
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 10

def chain_results
  @chain_results
end

#single_resultsArray<SmartCore::Types::Primitive::InvariantControl::Single::Result> (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.



16
17
18
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 16

def single_results
  @single_results
end

Instance Method Details

#add_chain_result(result) ⇒ 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.

This method returns an undefined value.



60
61
62
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 60

def add_chain_result(result)
  chain_results << result
end

#add_single_result(result) ⇒ 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.

This method returns an undefined value.



69
70
71
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 69

def add_single_result(result)
  single_results << result
end

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

Returns:

  • (Boolean)

Since:

  • 0.2.0



51
52
53
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 51

def failure?
  !success?
end

#invariant_errorsArray<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:

  • (Array<String>)

Since:

  • 0.2.0



35
36
37
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 35

def invariant_errors
  collect_invariant_errors
end

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

Returns:

  • (Boolean)

Since:

  • 0.2.0



43
44
45
# File 'lib/smart_core/types/primitive/invariant_control/result.rb', line 43

def success?
  chain_results.all(&:success?) && single_results.all?(&:success?)
end