Class: SmartCore::Types::Primitive::InvariantControl::Single::Result Private
- Inherits:
-
Object
- Object
- SmartCore::Types::Primitive::InvariantControl::Single::Result
- Defined in:
- lib/smart_core/types/primitive/invariant_control/single/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.
Instance Attribute Summary collapse
- #checked_value ⇒ Any readonly private
- #invariant ⇒ SmartCore::Types::Primitive::InvariantControl::Single readonly private
Instance Method Summary collapse
- #error_codes ⇒ Array<String> private
- #failure? ⇒ Boolean private
- #initialize(invariant, checked_value, is_valid_check) ⇒ void constructor private
- #success? ⇒ Boolean private
Constructor Details
#initialize(invariant, checked_value, is_valid_check) ⇒ 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.
25 26 27 28 29 |
# File 'lib/smart_core/types/primitive/invariant_control/single/result.rb', line 25 def initialize(invariant, checked_value, is_valid_check) @invariant = invariant @checked_value = checked_value @is_valid_check = is_valid_check end |
Instance Attribute Details
#checked_value ⇒ Any (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/single/result.rb', line 16 def checked_value @checked_value end |
#invariant ⇒ SmartCore::Types::Primitive::InvariantControl::Single (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/single/result.rb', line 10 def invariant @invariant end |
Instance Method Details
#error_codes ⇒ Array<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.
51 52 53 |
# File 'lib/smart_core/types/primitive/invariant_control/single/result.rb', line 51 def error_codes success? ? [] : [invariant.name] 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.
43 44 45 |
# File 'lib/smart_core/types/primitive/invariant_control/single/result.rb', line 43 def failure? !success? 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.
35 36 37 |
# File 'lib/smart_core/types/primitive/invariant_control/single/result.rb', line 35 def success? is_valid_check end |