Sha256: b0ccbfef965390e1faf10285c88cdfc6eb7457e156453357c11031d7c2534a20

Contents?: true

Size: 702 Bytes

Versions: 56

Compression:

Stored size: 702 Bytes

Contents

module Awspec::Type
  class BatchComputeEnvironment < ResourceBase
    def initialize(compenv)
      super
      @display_name = compenv
    end

    def resource_via_client
      @resource_via_client ||= find_batch_compute_environment(@display_name)
    end

    def id
      @id ||= resource_via_client.compute_environment_name if resource_via_client
    end

    STATES = %w(ENABLED DISABLED)

    STATES.each do |state|
      define_method state.downcase + '?' do
        resource_via_client.state == state
      end
    end

    TYPES = %w(MANAGED UNMANAGED)

    TYPES.each do |type|
      define_method type.downcase + '?' do
        resource_via_client.type == type
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/type/batch_compute_environment.rb
awspec-1.25.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.24.4 lib/awspec/type/batch_compute_environment.rb
awspec-1.24.3 lib/awspec/type/batch_compute_environment.rb
awspec-1.24.2 lib/awspec/type/batch_compute_environment.rb
awspec-1.24.1 lib/awspec/type/batch_compute_environment.rb
awspec-1.24.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.23.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.22.1 lib/awspec/type/batch_compute_environment.rb
awspec-1.22.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.21.1 lib/awspec/type/batch_compute_environment.rb
awspec-1.21.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.20.0 lib/awspec/type/batch_compute_environment.rb
awspec-1.19.2 lib/awspec/type/batch_compute_environment.rb
awspec-1.19.1 lib/awspec/type/batch_compute_environment.rb
awspec-1.19.0 lib/awspec/type/batch_compute_environment.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/batch_compute_environment.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/batch_compute_environment.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/batch_compute_environment.rb
awspec-1.18.6 lib/awspec/type/batch_compute_environment.rb