Class: CoderDecorator::Coders::Marshal

Inherits:
Coder
  • Object
show all
Defined in:
lib/coder_decorator/coders/marshal.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Coder

#coder

Instance Method Summary collapse

Methods inherited from Coder

#initialize

Constructor Details

This class inherits a constructor from CoderDecorator::Coders::Coder

Instance Method Details

#decode(str) ⇒ Object



12
13
14
# File 'lib/coder_decorator/coders/marshal.rb', line 12

def decode(str)
  coder.decode(::Marshal.load(str))
end

#encode(obj) ⇒ Object



8
9
10
# File 'lib/coder_decorator/coders/marshal.rb', line 8

def encode(obj)
  ::Marshal.dump(coder.encode(obj))
end