Sha256: 45269001bb0009bc515e064f0a6e41216a8fe00ace8979c30122534ee70cf0a5

Contents?: true

Size: 614 Bytes

Versions: 12

Compression:

Stored size: 614 Bytes

Contents

module Fog
  module AzureRM
    # class for Async Response
    class AsyncResponse
      def initialize(model, promise)
        @fog_model = model
        @promise = promise
      end

      def value
        response = @promise.value.body
        @fog_model.merge_attributes(@fog_model.class.parse(response))
      end

      def state
        @promise.state
      end

      def reason
        @promise.reason
      end

      def pending?
        @promise.pending?
      end

      def fulfilled?
        @promise.fulfilled?
      end

      def rejected?
        @promise.rejected?
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
fog-azure-rm-0.3.5 lib/fog/azurerm/async_response.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/async_response.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/async_response.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/async_response.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/async_response.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/async_response.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/async_response.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/async_response.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/async_response.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/async_response.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/async_response.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/async_response.rb