Class: Dynflow::Serializer

Inherits:
Algebrick::Serializer
  • Object
show all
Defined in:
lib/dynflow/serializer.rb

Constant Summary collapse

ARBITRARY_TYPE_KEY =
:class
MARSHAL_KEY =
:marshaled

Instance Method Summary collapse

Instance Method Details

#dump(object, options = {}) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/dynflow/serializer.rb', line 23

def dump(object, options = {})
  case object
  when ::Array
    object.collect { |v| dump(v) }
  else
    super
  end
end

#load(data, options = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/dynflow/serializer.rb', line 14

def load(data, options = {})
  case data
  when ::Array
    data.collect { |v| load(v) }
  else
    super
  end
end