Sha256: 80cb04e4f92366ec8c9539295f7cb03e43b734543224afe8ad74d3277ba72559

Contents?: true

Size: 377 Bytes

Versions: 8

Compression:

Stored size: 377 Bytes

Contents

require "faraday/response"

module ZendeskAPI
  module Middleware
    module Response
      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

8 entries across 8 versions & 1 rubygems

Version Path
zendesk_api-0.1.7 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.6 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.5 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.4 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.3 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.2 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.1.1 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-0.0.9 lib/zendesk_api/middleware/response/callback.rb