def var_set(k, v)
      varget = proc { instance_variable_get("@#{k}") }
      varset = proc { |y| instance_variable_set("@#{k}", y) }
      v.is_a?(Hash) ? convert(v) : instance_variable_set("@#{k}", v)
      self.class.send(:define_method, k, varget)
      self.class.send(:define_method, "#{k}=", varset)
    end
def var_set(k, v)
      varget = proc { instance_variable_get("@#{k}") }
      varset = proc { |y| instance_variable_set("@#{k}", y) }
      v.is_a?(Hash) ? convert(v) : instance_variable_set("@#{k}", v)
      self.class.send(:define_method, k, varget)
      self.class.send(:define_method, "#{k}=", varset)
    end
Sets all instance variables

 @param [String] k the key used to create the instance variables
 @param [String] v the value used to create the instance variables