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:



316
317
318
# File 'lib/vcr/structs.rb', line 316

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



325
326
327
# File 'lib/vcr/structs.rb', line 325

def to_proc
  lambda { proceed }
end