class OFX::Data::Serialization::Document::XML
Attributes
registry[R]
Public Class Methods
new(registry)
click to toggle source
# File lib/ofx/data/serialization/document/xml.rb, line 18 def initialize(registry) @registry = registry end
register_with(registry)
click to toggle source
# File lib/ofx/data/serialization/document/xml.rb, line 11 def self.register_with(registry) serializer = new(registry) registry.register(serializer.registry_entry) end
Public Instance Methods
default_registry_entry_args()
click to toggle source
# File lib/ofx/data/serialization/document/xml.rb, line 22 def default_registry_entry_args [:document, nil] end
registry_entry()
click to toggle source
# File lib/ofx/data/serialization/document/xml.rb, line 26 def registry_entry Registry::Entry.new(self, *default_registry_entry_args) end
serialize(document, builder)
click to toggle source
# File lib/ofx/data/serialization/document/xml.rb, line 30 def serialize(document, builder) decl = document.declaration builder.instruct! builder.instruct!(:OFX, { OFXHEADER: decl.ofxheader, VERSION: decl.version, SECURITY: decl.security, OLDFILEUID: decl.oldfileuid, NEWFILEUID: decl.newfileuid }) builder.OFX do |builder| serialize_object(document.message_sets, builder) end end