Class: CrossStub::Stores::File

Inherits:
Base
  • Object
show all
Defined in:
lib/cross-stub/stores/file.rb

Instance Method Summary collapse

Methods inherited from Base

#clear, #get, #set

Constructor Details

#initialize(file, truncate = true) ⇒ File

Returns a new instance of File.



5
6
7
8
# File 'lib/cross-stub/stores/file.rb', line 5

def initialize(file, truncate = true)
  @file = file
  super(truncate)
end

Instance Method Details

#currentObject



10
11
12
# File 'lib/cross-stub/stores/file.rb', line 10

def current
  @file
end

#previousObject



14
15
16
# File 'lib/cross-stub/stores/file.rb', line 14

def previous
  "#{@file}.stale"
end