Sha256: 22a55c5f013874fd418c4ac5a02a54d3e3f9e238385e714221aa6f28abdf9e6a
Contents?: true
Size: 599 Bytes
Versions: 34
Compression:
Stored size: 599 Bytes
Contents
module Awspec::Type class NatGateway < Base def initialize(id) super @resource_via_client = find_nat_gateway(id) @id = @resource_via_client.nat_gateway_id if @resource_via_client end STATES = %w( pending failed available deleting deleted ) STATES.each do |state| define_method state.tr('-', '_') + '?' do @resource_via_client.state == state end end def has_eip?(ip_address = nil) @resource_via_client.nat_gateway_addresses.find do |address| return address.public_ip == ip_address end end end end
Version data entries
34 entries across 34 versions & 1 rubygems