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-0.79.1 lib/awspec/type/resource_base.rb
awspec-0.79.0 lib/awspec/type/resource_base.rb
awspec-0.78.1 lib/awspec/type/resource_base.rb
awspec-0.77.1 lib/awspec/type/resource_base.rb
awspec-0.77.0 lib/awspec/type/resource_base.rb
awspec-0.76.1 lib/awspec/type/resource_base.rb
awspec-0.76.0 lib/awspec/type/resource_base.rb
awspec-0.75.2 lib/awspec/type/resource_base.rb
awspec-0.75.1 lib/awspec/type/resource_base.rb
awspec-0.75.0 lib/awspec/type/resource_base.rb
awspec-0.74.1 lib/awspec/type/resource_base.rb
awspec-0.74.0 lib/awspec/type/resource_base.rb
awspec-0.73.2 lib/awspec/type/resource_base.rb
awspec-0.73.1 lib/awspec/type/resource_base.rb
awspec-0.73.0 lib/awspec/type/resource_base.rb
awspec-0.72.0 lib/awspec/type/resource_base.rb
awspec-0.71.0 lib/awspec/type/resource_base.rb
awspec-0.70.0 lib/awspec/type/resource_base.rb