1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[vcloud|compute] ruby 1.8 compatibility

This commit is contained in:
Lincoln Stoll 2011-06-09 13:51:41 +10:00
parent 50862114ea
commit 486224023a

View file

@ -5,7 +5,8 @@ module Fog
class Real
def configure_vm_memory(vm_data)
edit_uri = vm_data.select {|k,v| k == :Link && v[:rel] == 'edit'}[:Link][:href]
edit_uri = vm_data.select {|k,v| k == :Link && v[:rel] == 'edit'}
edit_uri = edit_uri.kind_of?(Array) ? edit_uri.flatten[1][:href] : edit_uri[:Link][:href]
body = <<EOF
<?xml version="1.0" encoding="UTF-8"?>