Class: Undo::Serializer::Simple

Inherits:
Object
  • Object
show all
Defined in:
lib/undo/serializer/simple.rb

Instance Method Summary collapse

Instance Method Details

#load_from_json(json) ⇒ Object



10
11
12
# File 'lib/undo/serializer/simple.rb', line 10

def load_from_json(json)
  JSON.parse json
end

#load_from_xml(xml) ⇒ Object

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/undo/serializer/simple.rb', line 18

def load_from_xml(xml)
  raise NotImplementedError
end

#to_json(object) ⇒ Object



6
7
8
# File 'lib/undo/serializer/simple.rb', line 6

def to_json(object)
  object.to_json
end

#to_xml(object) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/undo/serializer/simple.rb', line 14

def to_xml(object)
  raise NotImplementedError
end