Method: SmartCore::Types::Primitive#initialize

Defined in:
lib/smart_core/types/primitive.rb

#initialize(name, category, validator, caster, runtime_attributes_checker, *runtime_attributes) ⇒ 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.

] rubocop:disable Metrics/ParameterLists

Parameters:

Since:

  • 0.1.0

Version:

  • 0.3.0



93
94
95
96
97
98
99
100
101
102
# File 'lib/smart_core/types/primitive.rb', line 93

def initialize(name, category, validator, caster, runtime_attributes_checker, *runtime_attributes)
  @name = name
  @category = category
  @validator = validator
  @caster = caster
  @nilable = nil
  @runtime_attributes_checker = runtime_attributes_checker
  @runtime_attributes = runtime_attributes
  @lock = SmartCore::Engine::Lock.new
end