Other way to do this whole block:

```ruby

# we have a more complex 'ebs' parameter
#'[<snapshot-id>][:<size>[:<delete-on-termination>][:<type>[:<iops>]]]'

mapping[:ebs] = {}

devparam = devparam.split ':'

# a bit ugly but short and won't change

# can be empty
mapping[:ebs][:snapshot_id] = devparam[0] if devparam[0] != ""

# we absolutely need that one
raise "You must specify int size for #{device} spec" if
  (!devparam[1] or !devparam[1].to_i)
mapping[:ebs][:volume_size] = devparam[1].to_i

# defaults to true - except if we have the exact string "false"
mapping[:ebs][:delete_on_termination] = (devparam[2] != "false")

# optional string
mapping[:ebs][:volume_type] = devparam[3] if devparam[3] != ""

# optional too - integer
mapping[:ebs][:iops] = devparam[4].to_i if (devparam[4].to_i)

```