class VCR::Request::Typed

Decorates a {Request} with its current type.

def externally_stubbed?

Other tags:
    See: #stubbed? -
    See: #stubbed_by_vcr? -

Returns:
  • (Boolean) - whether or not this request is being stubbed by an
def externally_stubbed?
  type == :externally_stubbed
end

def ignored?

Returns:
  • (Boolean) - whether or not this request is being ignored
def ignored?
  type == :ignored
end

def initialize(request, type)

Parameters:
  • type (Symbol) -- the type. Should be one of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`.
  • request (Request) -- the request
def initialize(request, type)
  @type = type
  super(request)
end

def real?

Other tags:
    Note: - VCR allows `:ignored` and `:recordable` requests to be made for real.

Returns:
  • (Boolean) - whether or not this request will be made for real.
def real?
  ignored? || recordable?
end

def recordable?

Returns:
  • (Boolean) - whether or not this request will be recorded.
def recordable?
  type == :recordable
end

def stubbed?

Other tags:
    See: #externally_stubbed? -
    See: #stubbed_by_vcr? -

Returns:
  • (Boolean) - whether or not this request will be stubbed.
def stubbed?
  stubbed_by_vcr? || externally_stubbed?
end

def stubbed_by_vcr?

Other tags:
    See: #stubbed? -
    See: #externally_stubbed? -

Returns:
  • (Boolean) - whether or not this request is being stubbed by VCR
def stubbed_by_vcr?
  type == :stubbed_by_vcr
end

def unhandled?

Returns:
  • (Boolean) - whether or not VCR knows how to handle this request.
def unhandled?
  type == :unhandled
end