Class: VCR::Request::FiberAware

Inherits:
Typed
  • Object
show all
Defined in:
lib/vcr/structs.rb

Overview

Provides fiber-awareness for the Configuration#around_http_request hook.

Instance Attribute Summary

Attributes inherited from Typed

#type

Instance Method Summary collapse

Methods inherited from Typed

#externally_stubbed?, #ignored?, #initialize, #real?, #recordable?, #stubbed?, #stubbed_by_vcr?, #unhandled?

Constructor Details

This class inherits a constructor from VCR::Request::Typed

Instance Method Details

#proceedVCR::Response

Yields the fiber so the request can proceed.

Returns:



300
301
302
# File 'lib/vcr/structs.rb', line 300

def proceed
  Fiber.yield
end

#to_procProc

Builds a proc that allows the request to proceed when called. This allows you to treat the request as a proc and pass it on to a method that yields (at which point the request will proceed).

Returns:

  • (Proc)

    the proc



309
310
311
# File 'lib/vcr/structs.rb', line 309

def to_proc
  proc { proceed }
end