Sha256: d5715b97cb378e8ead4c45ba819d657fcc6c690ada8e4c18b0299b4f0f60adfe

Contents?: true

Size: 457 Bytes

Versions: 26

Compression:

Stored size: 457 Bytes

Contents

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

    def resource_via_client
      @resource_via_client ||= find_subnet(@display_name)
    end

    def 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

26 entries across 26 versions & 1 rubygems

Version Path
awspec-0.59.0 lib/awspec/type/subnet.rb
awspec-0.58.0 lib/awspec/type/subnet.rb
awspec-0.57.1 lib/awspec/type/subnet.rb
awspec-0.57.0 lib/awspec/type/subnet.rb
awspec-0.56.1 lib/awspec/type/subnet.rb
awspec-0.56.0 lib/awspec/type/subnet.rb