This method converts from a Hash to an
OpenStructHash.
# File lib/rdoc/ri/driver.rb, line 24
def self.convert(object)
case object
when Hash then
new_hash = new # Convert Hash -> OpenStructHash
object.each do |key, value|
new_hash[key] = convert(value)
end
new_hash
when Array then
object.map do |element|
convert(element)
end
else
object
end
end