Class: GEXF::XmlSerializer
- Inherits:
-
Object
- Object
- GEXF::XmlSerializer
- Defined in:
- lib/gexf/xml_serializer.rb
Constant Summary collapse
- GEXF_ATTRS =
{ 'xmlns' => '"http://www.gexf.net/1.2draft', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi' => 'http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd', 'version' => '1.2' }
Instance Method Summary collapse
-
#initialize(graph) ⇒ XmlSerializer
constructor
A new instance of XmlSerializer.
- #serialize! ⇒ Object
Constructor Details
#initialize(graph) ⇒ XmlSerializer
Returns a new instance of XmlSerializer.
10 11 12 13 |
# File 'lib/gexf/xml_serializer.rb', line 10 def initialize(graph) @graph = graph @document = nil end |
Instance Method Details
#serialize! ⇒ Object
15 16 17 |
# File 'lib/gexf/xml_serializer.rb', line 15 def serialize! document.to_xml end |