Sha256: 0c6ede705ab58cba9d371d48daf69a598e25c68cbcd4c65ea2cc9a9a58b84ec5

Contents?: true

Size: 430 Bytes

Versions: 30

Compression:

Stored size: 430 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 call(env)
          @app.call(env).on_complete do |env|
            @client.callbacks.each { |c| c.call(env) }
          end
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
zendesk_api-1.37.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.36.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.35.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.34.0 lib/zendesk_api/middleware/response/callback.rb
discourse_zendesk_api-1.0.1 lib/zendesk_api/middleware/response/callback.rb
discourse_zendesk_api-1.0.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.33.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.32.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.31.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.30.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.29.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.28.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.27.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.26.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.25.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.24.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.23.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.22.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.21.0 lib/zendesk_api/middleware/response/callback.rb
zendesk_api-1.20.0 lib/zendesk_api/middleware/response/callback.rb