Module: Snow::ArrayMarshalSupport

Included in:
Mat3Array, Mat4Array, QuatArray, Vec3Array, Vec4Array
Defined in:
lib/snow-math/marshal.rb

Overview

:nodoc: all

Defined Under Namespace

Modules: MarshalLoadSupport

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



42
43
44
# File 'lib/snow-math/marshal.rb', line 42

def self.included(base)
  base.extend(MarshalLoadSupport)
end

Instance Method Details

#_dump(level) ⇒ Object



27
28
29
30
# File 'lib/snow-math/marshal.rb', line 27

def _dump(level)
  to_dump = [self.length, *self.to_a.map { |elem| elem.copy }]
  Marshal.dump(to_dump)
end