Sha256: 92a1f87862025e867211be96fd6ff1ded5c58df955dbe35ebb959f2f2b798904

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 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

3 entries across 3 versions & 1 rubygems

Version Path
awspec-0.33.0 lib/awspec/type/subnet.rb
awspec-0.32.0 lib/awspec/type/subnet.rb
awspec-0.31.0 lib/awspec/type/subnet.rb