Class: Undo::Serializer::Simple
- Inherits:
-
Object
- Object
- Undo::Serializer::Simple
- Defined in:
- lib/undo/serializer/simple.rb
Instance Method Summary collapse
- #load_from_json(json) ⇒ Object
- #load_from_xml(xml) ⇒ Object
- #to_json(object) ⇒ Object
- #to_xml(object) ⇒ Object
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
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
14 15 16 |
# File 'lib/undo/serializer/simple.rb', line 14 def to_xml(object) raise NotImplementedError end |