Class: AttrTypecastable::Types::ArrayFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/attr_typecastable/types/array.rb

Class Method Summary collapse

Class Method Details

.build(typecaster_name, **options) ⇒ Object



20
21
22
23
24
25
# File 'lib/attr_typecastable/types/array.rb', line 20

def self.build(typecaster_name, **options)
  typecaster = Types.typecaster_for(typecaster_name).new(options)
  klass = Class.new(ArrayBase)
  klass.inner_typecaster = typecaster
  klass
end