Sha256: 537bb1d89798b4e80fb05748f1b81ca8cf270c593551f26939289b796c6b49dc

Contents?: true

Size: 432 Bytes

Versions: 34

Compression:

Stored size: 432 Bytes

Contents

module Awspec::Type
  class Subnet < Base
    aws_resource Aws::EC2::Subnet
    tags_allowed

    def initialize(id)
      super
      @resource_via_client = find_subnet(id)
      @id = @resource_via_client.subnet_id if @resource_via_client
    end

    STATES = %w(
      available pending
    )

    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.38.0 lib/awspec/type/subnet.rb
awspec-0.37.8 lib/awspec/type/subnet.rb
awspec-0.37.7 lib/awspec/type/subnet.rb
awspec-0.37.6 lib/awspec/type/subnet.rb
awspec-0.37.5 lib/awspec/type/subnet.rb
awspec-0.37.4 lib/awspec/type/subnet.rb
awspec-0.37.3 lib/awspec/type/subnet.rb
awspec-0.37.2 lib/awspec/type/subnet.rb
awspec-0.37.1 lib/awspec/type/subnet.rb
awspec-0.37.0 lib/awspec/type/subnet.rb
awspec-0.36.1 lib/awspec/type/subnet.rb
awspec-0.36.0 lib/awspec/type/subnet.rb
awspec-0.35.0 lib/awspec/type/subnet.rb
awspec-0.34.0 lib/awspec/type/subnet.rb