Class: SPV::Fixtures::TmpKeeper

Inherits:
Object
  • Object
show all
Defined in:
lib/site_prism_vcr/fixtures/tmp_keeper.rb

Overview

This class is responsible for keeping a list of prepared fixtures which will be inserted to Vcr.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ TmpKeeper

Returns a new instance of TmpKeeper.



8
9
10
# File 'lib/site_prism_vcr/fixtures/tmp_keeper.rb', line 8

def initialize(options)
  @fixtures, @options = [], options
end

Instance Attribute Details

#fixturesObject (readonly)

Returns the value of attribute fixtures.



6
7
8
# File 'lib/site_prism_vcr/fixtures/tmp_keeper.rb', line 6

def fixtures
  @fixtures
end

Instance Method Details

#add_fixtures(new_fixtures) ⇒ Object



16
17
18
# File 'lib/site_prism_vcr/fixtures/tmp_keeper.rb', line 16

def add_fixtures(new_fixtures)
  @fixtures.concat(new_fixtures)
end

#clean_fixturesObject



12
13
14
# File 'lib/site_prism_vcr/fixtures/tmp_keeper.rb', line 12

def clean_fixtures
  @fixtures = []
end