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.6.0 lib/awspec/type/resource_base.rb
awspec-1.5.4 lib/awspec/type/resource_base.rb
awspec-1.5.3 lib/awspec/type/resource_base.rb
awspec-1.5.2 lib/awspec/type/resource_base.rb
awspec-1.5.1 lib/awspec/type/resource_base.rb
awspec-1.5.0 lib/awspec/type/resource_base.rb
awspec-1.4.3 lib/awspec/type/resource_base.rb
awspec-1.4.2 lib/awspec/type/resource_base.rb
awspec-1.4.1 lib/awspec/type/resource_base.rb
awspec-1.4.0 lib/awspec/type/resource_base.rb
awspec-1.3.1 lib/awspec/type/resource_base.rb
awspec-1.3.0 lib/awspec/type/resource_base.rb
awspec-1.2.0 lib/awspec/type/resource_base.rb
awspec-1.1.0 lib/awspec/type/resource_base.rb
awspec-1.0.0 lib/awspec/type/resource_base.rb
awspec-1.0.0.rc lib/awspec/type/resource_base.rb
awspec-0.88.2 lib/awspec/type/resource_base.rb
awspec-0.88.1 lib/awspec/type/resource_base.rb
awspec-0.88.0 lib/awspec/type/resource_base.rb
awspec-0.87.1 lib/awspec/type/resource_base.rb