Class: SmartCore::Types::Primitive::MultFactory::DefinitionContext Private
- Inherits:
-
Object
- Object
- SmartCore::Types::Primitive::MultFactory::DefinitionContext
- Defined in:
- lib/smart_core/types/primitive/mult_factory/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
- #type_caster ⇒ Proc, NilClass readonly private
- #type_runtime_attributes_checker ⇒ Proc, NilClass readonly private
Instance Method Summary collapse
- #define_caster(&caster) ⇒ void
- #initialize ⇒ void constructor private
- #runtime_attributes_checker(&definition) ⇒ void
Constructor Details
#initialize ⇒ 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.
24 25 26 27 |
# File 'lib/smart_core/types/primitive/mult_factory/definition_context.rb', line 24 def initialize @type_caster = nil @type_runtime_attributes_checker = nil end |
Instance Attribute Details
#type_caster ⇒ Proc, NilClass (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.
11 12 13 |
# File 'lib/smart_core/types/primitive/mult_factory/definition_context.rb', line 11 def type_caster @type_caster end |
#type_runtime_attributes_checker ⇒ Proc, NilClass (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.
17 18 19 |
# File 'lib/smart_core/types/primitive/mult_factory/definition_context.rb', line 17 def type_runtime_attributes_checker @type_runtime_attributes_checker end |
Instance Method Details
#define_caster(&caster) ⇒ void
This method returns an undefined value.
35 36 37 38 |
# File 'lib/smart_core/types/primitive/mult_factory/definition_context.rb', line 35 def define_caster(&caster) raise(SmartCore::Types::TypeDefinitionError, 'No caster definition block') unless block_given? @type_caster = caster end |
#runtime_attributes_checker(&definition) ⇒ void
This method returns an undefined value.
45 46 47 48 49 50 |
# File 'lib/smart_core/types/primitive/mult_factory/definition_context.rb', line 45 def runtime_attributes_checker(&definition) unless block_given? raise(SmartCore::Types::TypeDefinitionError, 'No runtime checker definition block') end @type_runtime_attributes_checker = definition end |