Sha256: d5931920091f026b453b9cda1eb7e82365162a56868d73d7cf7bd42a498f8808

Contents?: true

Size: 452 Bytes

Versions: 118

Compression:

Stored size: 452 Bytes

Contents

module Awspec::Type
  class ResourceBase < Base
    attr_reader :id, :resource_via_client

    def initialize(display_name = nil)
      @display_name = display_name
      @id = nil
    end

    def exists?
      id
    end

    def id
      raise 'this method must be override!'
    end

    def self.aws_resource(resource)
      define_method :resource do
        @resource ||= Awspec::ResourceReader.new(resource.new(id))
      end
    end
  end
end

Version data entries

118 entries across 118 versions & 4 rubygems

Version Path
awspec-1.15.1 lib/awspec/type/resource_base.rb
awspec-1.15.0 lib/awspec/type/resource_base.rb
awspec-1.14.1 lib/awspec/type/resource_base.rb
awspec-1.14.0 lib/awspec/type/resource_base.rb
awspec-1.13.0 lib/awspec/type/resource_base.rb
awspec-1.12.7 lib/awspec/type/resource_base.rb
awspec-1.12.6 lib/awspec/type/resource_base.rb
awspec-1.12.5 lib/awspec/type/resource_base.rb
awspec-1.12.4 lib/awspec/type/resource_base.rb
awspec-1.12.3 lib/awspec/type/resource_base.rb
awspec-1.12.2 lib/awspec/type/resource_base.rb
awspec-1.12.1 lib/awspec/type/resource_base.rb
awspec-1.12.0 lib/awspec/type/resource_base.rb
awspec-1.11.1 lib/awspec/type/resource_base.rb
awspec-1.11.0 lib/awspec/type/resource_base.rb
awspec-1.10.0 lib/awspec/type/resource_base.rb
awspec-1.9.0 lib/awspec/type/resource_base.rb
awspec-1.8.0 lib/awspec/type/resource_base.rb
awspec-1.7.0 lib/awspec/type/resource_base.rb
awspec-1.6.1 lib/awspec/type/resource_base.rb