def define_accessors(field)
      # add the generated method
      self.generated_methods.module_eval do
        define_method(field) do
          @hash[field]
        end
        define_method("#{field}=") do |val|
          @hash[field] = val
        end
      end
    end
def define_accessors(field)
      # add the generated method
      self.generated_methods.module_eval do
        define_method(field) do
          @hash[field]
        end
        define_method("#{field}=") do |val|
          @hash[field] = val
        end
      end
    end
define accessors for an attribute