Module: AttributedObject::Strict::InstanceMethods
- Includes:
- Base::InstanceMethods
- Defined in:
- lib/attributed_object/strict.rb
Instance Method Summary collapse
Methods included from Base::InstanceMethods
#==, #as_json, #attributes, #initialize, #initialize_attributes
Instance Method Details
#_attributed_object_on_init_attribute(type_info, value, name:, args:) ⇒ Object
20 21 22 23 24 |
# File 'lib/attributed_object/strict.rb', line 20 def _attributed_object_on_init_attribute(type_info, value, name:, args:) type_matches = AttributedObjectHelpers::TypeCheck.check(type_info, value) raise TypeError.new(self.class, name, args) if !type_matches return value end |