class OpenStruct

def encode_with(coder) # :nodoc:

:nodoc:

Provides marshalling support for use by the YAML library.
def encode_with(coder) # :nodoc:
  @table.each_pair do |key, value|
    coder[key.to_s] = value
  end
  if @table.size == 1 && @table.key?(:table) # support for legacy format
    # in the very unlikely case of a single entry called 'table'
    coder['legacy_support!'] = true # add a bogus second entry
  end
end