mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[core] fix attribute squashing with : in key
It can happen, that the squashing options conatins a : within its key, for example: :squash => :'ovf:Item' . However this fails if we don't quote the used symbol. Note that :a == :'a', hence we don't change anything on how things work.
This commit is contained in:
parent
7a3ac7e54f
commit
7ac96b96e3
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ module Fog
|
|||
class_eval <<-EOS, __FILE__, __LINE__
|
||||
def #{name}=(new_data)
|
||||
if new_data.is_a?(Hash)
|
||||
if new_data.has_key?(:#{squash})
|
||||
attributes[:#{name}] = new_data[:#{squash}]
|
||||
if new_data.has_key?(:'#{squash}')
|
||||
attributes[:#{name}] = new_data[:'#{squash}']
|
||||
elsif new_data.has_key?("#{squash}")
|
||||
attributes[:#{name}] = new_data["#{squash}"]
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue