class OpenStruct
def to_h
data.to_h # => {:country => "Australia", :capital => "Canberra" }
data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
require "ostruct"
each attribute (as symbols) and their corresponding values.
Converts the OpenStruct to a hash with keys representing
def to_h @table.dup end