Sha256: 25ddbb1203d22012a0e0b74678d7c4eeb2fb5262f9c310e0f8a14512e2e3e7f6

Contents?: true

Size: 524 Bytes

Versions: 12

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

module Awspec::Type
  class TransferServer < ResourceBase
    attr_reader :id

    tags_allowed

    def initialize(id)
      super
      @id = id
    end

    def resource_via_client
      @resource_via_client ||= find_transfer_server(@id)
    end

    STATES = %w[
      OFFLINE ONLINE STARTING STOPPING START_FAILED STOP_FAILED
    ]

    STATES.each do |state|
      define_method "#{state.downcase.tr('-', '_')}?" do
        resource_via_client.state == state
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
awspec-1.31.0 lib/awspec/type/transfer_server.rb
awspec-1.30.0 lib/awspec/type/transfer_server.rb
awspec-1.29.3 lib/awspec/type/transfer_server.rb
awspec-1.29.2 lib/awspec/type/transfer_server.rb
awspec-1.29.1 lib/awspec/type/transfer_server.rb
awspec-1.29.0 lib/awspec/type/transfer_server.rb
awspec-1.28.2 lib/awspec/type/transfer_server.rb
awspec-1.28.1 lib/awspec/type/transfer_server.rb
awspec-1.28.0 lib/awspec/type/transfer_server.rb
awspec-1.27.1 lib/awspec/type/transfer_server.rb
awspec-1.27.0 lib/awspec/type/transfer_server.rb
awspec-1.26.0 lib/awspec/type/transfer_server.rb