Parent

Class/Module Index [+]

Quicksearch

WebMock::CallbackRegistry

Public Class Methods

add_callback(options, block) click to toggle source
# File lib/webmock/callback_registry.rb, line 5
def self.add_callback(options, block)
  @@callbacks << {:options => options, :block => block}
end
any_callbacks?() click to toggle source
# File lib/webmock/callback_registry.rb, line 30
def self.any_callbacks?
  !@@callbacks.empty?
end
callbacks() click to toggle source
# File lib/webmock/callback_registry.rb, line 9
def self.callbacks
  @@callbacks
end
invoke_callbacks(options, request_signature, response) click to toggle source
# File lib/webmock/callback_registry.rb, line 13
def self.invoke_callbacks(options, request_signature, response)
  return if @@callbacks.empty?
  CallbackRegistry.callbacks.each do |callback|
    except = callback[:options][:except]
    real_only = callback[:options][:real_requests_only]
    unless except && except.include?(options[:lib])
      if !real_only || options[:real_request]
        callback[:block].call(request_signature, response)
      end
    end
  end
end
reset() click to toggle source
# File lib/webmock/callback_registry.rb, line 26
def self.reset
  @@callbacks = []
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.