Sha256: 089eaf1460b7f44f909faa76b219718db67d5c7dbe6a3a1b86adb3ffc026f99e
Contents?: true
Size: 700 Bytes
Versions: 3
Compression:
Stored size: 700 Bytes
Contents
module Awspec::Type class Vpc < Base attr_reader :client def initialize(id) super @client = @ec2_client @resource_via_client = find_vpc(id) @id = @resource_via_client[:vpc_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 def has_route_table?(id) route_table = find_route_table(id) return false unless route_table route_table[:vpc_id] == @id end def has_network_acl?(id) n = find_network_acl(id) return false unless n n[:vpc_id] == @id end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
awspec-0.26.2 | lib/awspec/type/vpc.rb |
awspec-0.26.1 | lib/awspec/type/vpc.rb |
awspec-0.26.0 | lib/awspec/type/vpc.rb |