Sha256: 997fbef38e5f146834e7d8d9f3b403b0d89eb6291d7f2d6e0fe89f981dfb549e

Contents?: true

Size: 457 Bytes

Versions: 34

Compression:

Stored size: 457 Bytes

Contents

module Awspec::Type
  class Ami < Base
    aws_resource Aws::EC2::Image

    def initialize(id)
      super
      @resource_via_client = find_ami(id)
      @id = @resource_via_client.image_id if @resource_via_client
    end

    STATES = %w(
      pending available invalid deregistered
      transient failed error
    )

    STATES.each do |state|
      define_method state + '?' do
        @resource_via_client.state == state
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
awspec-0.55.0 lib/awspec/type/ami.rb
awspec-0.54.0 lib/awspec/type/ami.rb
awspec-0.52.4 lib/awspec/type/ami.rb
awspec-0.52.3 lib/awspec/type/ami.rb
awspec-0.52.2 lib/awspec/type/ami.rb
awspec-0.52.1 lib/awspec/type/ami.rb
awspec-0.52.0 lib/awspec/type/ami.rb
awspec-0.51.0 lib/awspec/type/ami.rb
awspec-0.50.0 lib/awspec/type/ami.rb
awspec-0.49.0 lib/awspec/type/ami.rb
awspec-0.48.0 lib/awspec/type/ami.rb
awspec-0.47.0 lib/awspec/type/ami.rb
awspec-0.46.0 lib/awspec/type/ami.rb
awspec-0.45.0 lib/awspec/type/ami.rb
awspec-0.44.0 lib/awspec/type/ami.rb
awspec-0.43.0 lib/awspec/type/ami.rb
awspec-0.42.0 lib/awspec/type/ami.rb
awspec-0.41.0 lib/awspec/type/ami.rb
awspec-0.40.0 lib/awspec/type/ami.rb
awspec-0.39.0 lib/awspec/type/ami.rb