Typhoeus::Hydra::Callbacks

Public Class Methods

extended(base) click to toggle source
# File lib/typhoeus/hydra/callbacks.rb, line 4
def self.extended(base)
  class << base
    attr_accessor :global_hooks
  end
  base.global_hooks = Hash.new { |h, k| h[k] = [] }
end

Public Instance Methods

after_request_before_on_complete(&block) click to toggle source
# File lib/typhoeus/hydra/callbacks.rb, line 11
def after_request_before_on_complete(&block)
  global_hooks[:after_request_before_on_complete] << block
end
clear_global_hooks() click to toggle source
# File lib/typhoeus/hydra/callbacks.rb, line 19
def clear_global_hooks
  global_hooks.clear
end
run_global_hooks_for(name, request) click to toggle source
# File lib/typhoeus/hydra/callbacks.rb, line 15
def run_global_hooks_for(name, request)
  global_hooks[name].each { |hook| hook.call(request) }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.