зеркало из https://github.com/microsoft/fog.git
just send strings rather than casting to symbol
This commit is contained in:
Родитель
52b3199555
Коммит
ea6655838a
|
@ -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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче