Sha256: a9a2d0d731f9403baf2231569d184f5c93a6a06de435b626b990f600b1367df3

Contents?: true

Size: 436 Bytes

Versions: 7

Compression:

Stored size: 436 Bytes

Contents

require 'aws-sdk'
require 'awspec/helper/finder'

module Awspec::Type
  class Base
    include Awspec::Helper::Finder
    attr_reader :id, :resource

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

    def exists?
      @id
    end

    def method_missing(name)
      describe = name.to_sym
      if @resource.members.include?(describe)
        @resource[describe]
      else
        super
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
awspec-0.12.0 lib/awspec/type/base.rb
awspec-0.11.0 lib/awspec/type/base.rb
awspec-0.10.2 lib/awspec/type/base.rb
awspec-0.10.1 lib/awspec/type/base.rb
awspec-0.10.0 lib/awspec/type/base.rb
awspec-0.9.0 lib/awspec/type/base.rb
awspec-0.8.1 lib/awspec/type/base.rb