module VCR::Hooks
@private
Constants
- FilteredHook
@private
Public Class Methods
included(klass)
click to toggle source
# File lib/vcr/util/hooks.rb, line 19 def self.included(klass) klass.class_eval do extend ClassMethods hooks_module = Module.new const_set("DefinedHooks", hooks_module) include hooks_module end end
Public Instance Methods
clear_hooks()
click to toggle source
# File lib/vcr/util/hooks.rb, line 34 def clear_hooks hooks.clear end
has_hooks_for?(hook_type)
click to toggle source
# File lib/vcr/util/hooks.rb, line 44 def has_hooks_for?(hook_type) hooks[hook_type].any? end
hooks()
click to toggle source
# File lib/vcr/util/hooks.rb, line 38 def hooks @hooks ||= Hash.new do |hash, hook_type| hash[hook_type] = [] end end
invoke_hook(hook_type, *args)
click to toggle source
# File lib/vcr/util/hooks.rb, line 28 def invoke_hook(hook_type, *args) hooks[hook_type].map do |hook| hook.conditionally_invoke(*args) end end