Class: VCR::Cassette::Migrator

Inherits:
Object
  • Object
show all
Defined in:
lib/vcr/cassette/migrator.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir, out = $stdout) ⇒ Migrator

Returns a new instance of Migrator.



7
8
9
10
# File 'lib/vcr/cassette/migrator.rb', line 7

def initialize(dir, out = $stdout)
  @dir, @out = dir, out
  @yaml_load_errors = yaml_load_errors
end

Instance Method Details

#migrate!Object



12
13
14
15
16
17
# File 'lib/vcr/cassette/migrator.rb', line 12

def migrate!
  @out.puts "Migrating VCR cassettes in #{@dir}..."
  Dir["#{@dir}/**/*.yml"].each do |cassette|
    migrate_cassette(cassette)
  end
end