Sha256: f6c0636b7d3d98551d672dcedf12231c12c6542ca23a11e18a23d655f19730cd

Contents?: true

Size: 484 Bytes

Versions: 3

Compression:

Stored size: 484 Bytes

Contents

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

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

    def id
      @id ||= resource_via_client.internet_gateway_id if resource_via_client
    end

    def attached_to?(vpc)
      resource_via_client.attachments.find do |a|
        a.vpc_id == find_vpc(vpc).vpc_id && a.state == 'attached'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
awspec-0.69.1 lib/awspec/type/internet_gateway.rb
awspec-0.69.0 lib/awspec/type/internet_gateway.rb
awspec-0.68.0 lib/awspec/type/internet_gateway.rb