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:


297
298
299
# File 'lib/vcr/structs.rb', line 297

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


306
307
308
# File 'lib/vcr/structs.rb', line 306

def to_proc
  lambda { proceed }
end