Fixed a bug in the method definition closures.

This commit is contained in:
Bob Aman 2011-08-10 16:59:55 -04:00
parent 27ae32d2e7
commit 105dbd64f2
1 changed files with 2 additions and 2 deletions

View File

@ -231,14 +231,14 @@ module Google
# TODO finish this up...
schema = Schema.parse(api, schema_data)
define_method(property_name) do
self[key] ||= v['default']
self[key] ||= schema_data['default']
schema.new(self[key])
end
end
def self.define_any_property(api, property_name, key, schema_data)
define_method(property_name) do
self[key] ||= v['default']
self[key] ||= schema_data['default']
end
define_method(property_name + '=') do |value|
self[key] = value