Sha256: 5a5db4f2ce9fad4fa5886a73ebbda4d24a6b68ae4a6ec71141a3d5a00b978e97
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
module Awspec::Type class Subnet < Base attr_reader :subnet def initialize(id) super @subnet = find_subnet(id) @id = @subnet[:subnet_id] if @subnet end states = %w( available pending ) states.each do |state| define_method state + '?' do @subnet[:state] == state end end def method_missing(name) describe = name.to_sym if @subnet.members.include?(describe) @subnet[describe] else super end end end end
Version data entries
10 entries across 10 versions & 1 rubygems