just send strings rather than casting to symbol

This commit is contained in:
Wesley Beary 2009-09-14 21:36:24 -07:00
Родитель 52b3199555
Коммит ea6655838a
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -39,7 +39,7 @@ module Fog
def attributes def attributes
attributes = {} attributes = {}
for attribute in self.class.attributes for attribute in self.class.attributes
attributes[attribute] = send(:"#{attribute}") attributes[attribute] = send("#{attribute}")
end end
attributes attributes
end end
@ -47,9 +47,9 @@ module Fog
def merge_attributes(new_attributes = {}) def merge_attributes(new_attributes = {})
for key, value in new_attributes for key, value in new_attributes
if aliased_key = self.class.aliases[key] if aliased_key = self.class.aliases[key]
send(:"#{aliased_key}=", value) send("#{aliased_key}=", value)
else else
send(:"#{key}=", value) send("#{key}=", value)
end end
end end
self self

Просмотреть файл

@ -34,7 +34,7 @@ module Fog
def attributes def attributes
attributes = {} attributes = {}
for attribute in self.class.attributes for attribute in self.class.attributes
attributes[attribute] = send(:"#{attribute}") attributes[attribute] = send("#{attribute}")
end end
attributes attributes
end end
@ -42,9 +42,9 @@ module Fog
def merge_attributes(new_attributes = {}) def merge_attributes(new_attributes = {})
for key, value in new_attributes for key, value in new_attributes
if aliased_key = self.class.aliases[key] if aliased_key = self.class.aliases[key]
send(:"#{aliased_key}=", value) send("#{aliased_key}=", value)
else else
send(:"#{key}=", value) send("#{key}=", value)
end end
end end
self self