mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
prevent adding property to collection/model multiple times
This commit is contained in:
parent
3611de077d
commit
50a126335f
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,8 @@ module Fog
|
||||||
class_eval <<-EOS, __FILE__, __LINE__
|
class_eval <<-EOS, __FILE__, __LINE__
|
||||||
attr_accessor :#{name}
|
attr_accessor :#{name}
|
||||||
EOS
|
EOS
|
||||||
attributes << name
|
@attributes ||= []
|
||||||
|
@attributes |= [name]
|
||||||
for other_name in [*other_names]
|
for other_name in [*other_names]
|
||||||
aliases[other_name] = name
|
aliases[other_name] = name
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,8 @@ module Fog
|
||||||
class_eval <<-EOS, __FILE__, __LINE__
|
class_eval <<-EOS, __FILE__, __LINE__
|
||||||
attr_accessor :#{name}
|
attr_accessor :#{name}
|
||||||
EOS
|
EOS
|
||||||
attributes << name
|
@attributes ||= []
|
||||||
|
@attributes |= [name]
|
||||||
for other_name in [*other_names]
|
for other_name in [*other_names]
|
||||||
aliases[other_name] = name
|
aliases[other_name] = name
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue