class VCR::Middleware::CassetteArguments

Object yielded by VCR's {Rack} middleware that allows you to configure the cassette dynamically based on the rack env.

Public Class Methods

new() click to toggle source

@private

# File lib/vcr/middleware/rack.rb, line 7
def initialize
  @name    = nil
  @options = {}
end

Public Instance Methods

name(name = nil) click to toggle source

Sets (and gets) the cassette name.

@param [#to_s] name the cassette name @return [#to_s] the cassette name

# File lib/vcr/middleware/rack.rb, line 16
def name(name = nil)
  @name = name if name
  @name
end
options(options = {}) click to toggle source

Sets (and gets) the cassette options.

@param [Hash] options the cassette options @return [Hash] the cassette options

# File lib/vcr/middleware/rack.rb, line 25
def options(options = {})
  @options.merge!(options)
end