Module: Snow::ArrayMarshalSupport

Included in:
Mat3Array, Mat4Array, QuatArray, Vec2Array, 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



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

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

Instance Method Details

#_dump(level) ⇒ Object



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

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