Class: XmlFu::OpenStruct

Inherits:
Object
  • Object
show all
Defined in:
lib/xml-fu/open_struct.rb

Overview

An OpenStruct object behaves similar to a Hash in that it has key/value pairs, but is more restrictive with key names. As such, it is near impossible to set “attribute” keys on an OpenStruct object.

Class Method Summary collapse

Class Method Details

.to_xml(obj, options = {}) ⇒ Object



11
12
13
# File 'lib/xml-fu/open_struct.rb', line 11

def self.to_xml(obj, options={})
  Hash.to_xml(obj.marshal_dump, options)
end