lib/fog/aws/models/compute/image.rb in fog-1.22.0 vs lib/fog/aws/models/compute/image.rb in fog-1.22.1

- old
+ new

@@ -1,13 +1,11 @@ require 'fog/core/model' module Fog module Compute class AWS - class Image < Fog::Model - identity :id, :aliases => 'imageId' attribute :architecture attribute :block_device_mapping, :aliases => 'blockDeviceMapping' attribute :description @@ -28,21 +26,19 @@ def deregister(delete_snapshot = false) service.deregister_image(id) if(delete_snapshot && root_device_type == "ebs") - block_device = block_device_mapping.detect {|block_device| block_device['deviceName'] == root_device_name} + block_device = block_device_mapping.find {|block_device| block_device['deviceName'] == root_device_name} service.snapshots.new(:id => block_device['snapshotId']).destroy else true end end def ready? state == 'available' end - end - end end end