Method: NoBrainer::TypedArray.of
- Defined in:
- lib/no_brainer/document/types/array.rb
.of(object_type, allow_nil: false) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/no_brainer/document/types/array.rb', line 45 def self.of(object_type, allow_nil: false) NoBrainer::Document::Types.load_type_extensions(object_type) ::Class.new(TypedArray) do define_singleton_method(:object_type) { object_type } define_singleton_method(:allow_nil?) { allow_nil } end end |