Sha256: 5f88f971e2bcd1a5f93877e78d4400356b05992400d307e8f45135e27567ae68

Contents?: true

Size: 419 Bytes

Versions: 7

Compression:

Stored size: 419 Bytes

Contents

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

    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

7 entries across 7 versions & 1 rubygems

Version Path
awspec-0.30.0 lib/awspec/type/subnet.rb
awspec-0.29.0 lib/awspec/type/subnet.rb
awspec-0.28.1 lib/awspec/type/subnet.rb
awspec-0.28.0 lib/awspec/type/subnet.rb
awspec-0.27.2 lib/awspec/type/subnet.rb
awspec-0.27.1 lib/awspec/type/subnet.rb
awspec-0.27.0 lib/awspec/type/subnet.rb