Class: VCR::Middleware::CassetteArguments
- Inherits:
-
Object
- Object
- VCR::Middleware::CassetteArguments
- Defined in:
- lib/vcr/middleware/rack.rb
Overview
Object yielded by VCR’s Rack middleware that allows you to configure the cassette dynamically based on the rack env.
Instance Method Summary collapse
-
#initialize ⇒ CassetteArguments
constructor
A new instance of CassetteArguments.
-
#name(name = nil) ⇒ #to_s
Sets (and gets) the cassette name.
-
#options(options = {}) ⇒ Hash
Sets (and gets) the cassette options.
Constructor Details
#initialize ⇒ CassetteArguments
Returns a new instance of CassetteArguments.
7 8 9 10 |
# File 'lib/vcr/middleware/rack.rb', line 7 def initialize @name = nil @options = {} end |
Instance Method Details
#name(name = nil) ⇒ #to_s
Sets (and gets) the cassette name.
16 17 18 19 |
# File 'lib/vcr/middleware/rack.rb', line 16 def name(name = nil) @name = name if name @name end |
#options(options = {}) ⇒ Hash
Sets (and gets) the cassette options.
25 26 27 |
# File 'lib/vcr/middleware/rack.rb', line 25 def ( = {}) @options.merge!() end |