class VantivLite::XML::Ox::Serializer
Public Instance Methods
call(hash)
click to toggle source
# File lib/vantiv_lite/xml/ox.rb, line 26 def call(hash) ::Ox.dump(add_xml_elements!(::Ox::Document.new(version: '1.0'), hash)) end
Private Instance Methods
attributes_or_elements!(parent, key, value)
click to toggle source
# File lib/vantiv_lite/xml/ox.rb, line 32 def attributes_or_elements!(parent, key, value) return parent[key] = text_with(value) if attributes.include?(key) e = ::Ox::Element.new(key) parent << e add_xml_elements!(e, value) end
insert_text!(node, text)
click to toggle source
# File lib/vantiv_lite/xml/ox.rb, line 39 def insert_text!(node, text) node << text_with(text) end