Sha256: 554ed82ef6e05200765f46a0750cd51db96675b9629cd0461c8e4fc1597733c6

Contents?: true

Size: 501 Bytes

Versions: 8

Compression:

Stored size: 501 Bytes

Contents

module Awspec::Type
  class EcsService < Base
    def initialize(service)
      super
      @display_name = service
    end

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

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

    STATES = %w(ACTIVE DRAINING INACTIVE)

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awspec-0.69.1 lib/awspec/type/ecs_service.rb
awspec-0.69.0 lib/awspec/type/ecs_service.rb
awspec-0.68.0 lib/awspec/type/ecs_service.rb
awspec-0.67.1 lib/awspec/type/ecs_service.rb
awspec-0.67.0 lib/awspec/type/ecs_service.rb
awspec-0.66.2 lib/awspec/type/ecs_service.rb
awspec-0.66.1 lib/awspec/type/ecs_service.rb
awspec-0.66.0 lib/awspec/type/ecs_service.rb