Sha256: c3cb6580b00ff0c36d27d24cecee914c4c1b567ff61a00bda43784dafaee26a4

Contents?: true

Size: 394 Bytes

Versions: 12

Compression:

Stored size: 394 Bytes

Contents

require "faraday/response"

module ZendeskAPI
  module Middleware
    module Response
      # @private
      class Callback < Faraday::Response::Middleware
        def initialize(app, client)
          super(app)
          @client = client
        end

        def on_complete(env)
          super(env)
          @client.callbacks.each {|c| c.call(env)}
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
zendesk_api-0.3.2 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.3.1 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.3.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.2.6 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.2.5 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.2.4 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.2.2 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.2.1 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.11 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.10 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.9 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.8 lib/zendesk_api/middleware/response/callback.rb