Class: VCR::LinkedCassette

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/vcr/linked_cassette.rb

Overview

A Cassette wrapper for linking cassettes from another thread

Defined Under Namespace

Classes: CassetteList

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.list(cassettes, linked_cassettes) ⇒ Object

Create a new CassetteList

Parameters:

  • cassettes (Array)

    context-owned cassettes

  • linked_cassettes (Array)

    context-unowned (linked) cassettes


57
58
59
# File 'lib/vcr/linked_cassette.rb', line 57

def self.list(cassettes, linked_cassettes)
  CassetteList.new(cassettes, linked_cassettes)
end

Instance Method Details

#eject(*args) ⇒ Object

Prevents cassette ejection by raising EjectLinkedCassetteError


62
63
64
65
# File 'lib/vcr/linked_cassette.rb', line 62

def eject(*args)
  raise Errors::EjectLinkedCassetteError,
    "cannot eject a cassette inserted by a parent thread"
end

#linked?Boolean

Returns true.

Returns:

  • (Boolean)

    true


68
69
70
# File 'lib/vcr/linked_cassette.rb', line 68

def linked?
  true
end