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

[google|compute] disk model: get_object fix for Ruby 1.8

This commit is contained in:
kbockmanrs 2014-03-06 18:55:24 +00:00
parent 044ca68e74
commit 0c07637cb8

View file

@ -59,13 +59,14 @@ module Fog
def get_object(writable=true, boot=false, device_name=nil)
mode = writable ? 'READ_WRITE' : 'READ_ONLY'
return {
value = {
'boot' => boot,
'source' => self_link,
'mode' => mode,
'deviceName' => device_name,
'type' => 'PERSISTENT'
}.select { |k, v| !v.nil? }
return Hash[value]
end
def get_as_boot_disk(writable=true)