Class: SmartCore::Types::Primitive::InvariantControl::Factory::ChainDefinitionContext Private
- Inherits:
-
Object
- Object
- SmartCore::Types::Primitive::InvariantControl::Factory::ChainDefinitionContext
- Defined in:
- lib/smart_core/types/primitive/invariant_control/factory/chain_definition_context.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
- #___chain___ ⇒ SmartCore::Types::Primitive::InvariantControl::Chain readonly private
Instance Method Summary collapse
- #initialize(chain_name) ⇒ void constructor
- #invariant(invariant_name, &invariant_definition) ⇒ void private
Constructor Details
Instance Attribute Details
#___chain___ ⇒ SmartCore::Types::Primitive::InvariantControl::Chain (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/factory/chain_definition_context.rb', line 10 def ___chain___ @___chain___ end |
Instance Method Details
#invariant(invariant_name, &invariant_definition) ⇒ 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.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/smart_core/types/primitive/invariant_control/factory/chain_definition_context.rb', line 27 def invariant(invariant_name, &invariant_definition) SmartCore::Types::Primitive::Factory::DefinitionContext.vaildate_invariant_attributes!( invariant_name, &invariant_definition ) ___chain___.add_invariant( SmartCore::Types::Primitive::InvariantControl::Single.create( invariant_name, invariant_definition ) ) end |