Class: VCR::LibraryHooks
- Inherits:
-
Object
- Object
- VCR::LibraryHooks
- Defined in:
- lib/vcr/library_hooks.rb,
lib/vcr/library_hooks/excon.rb,
lib/vcr/library_hooks/faraday.rb,
lib/vcr/library_hooks/webmock.rb,
lib/vcr/library_hooks/typhoeus.rb
Defined Under Namespace
Modules: Excon, Faraday, Typhoeus, WebMock
Instance Attribute Summary collapse
-
#exclusive_hook ⇒ Object
Returns the value of attribute exclusive_hook.
Instance Method Summary collapse
Instance Attribute Details
#exclusive_hook ⇒ Object
Returns the value of attribute exclusive_hook.
4 5 6 |
# File 'lib/vcr/library_hooks.rb', line 4 def exclusive_hook @exclusive_hook end |
Instance Method Details
#disabled?(hook) ⇒ Boolean
6 7 8 |
# File 'lib/vcr/library_hooks.rb', line 6 def disabled?(hook) ![nil, hook].include?(exclusive_hook) end |
#exclusively_enabled(hook) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/vcr/library_hooks.rb', line 10 def exclusively_enabled(hook) self.exclusive_hook = hook yield ensure self.exclusive_hook = nil end |