Sha256: fd7f637ae480eeb965bd287dcbed46883586cc478843733ff93ca01d160d55cc

Contents?: true

Size: 256 Bytes

Versions: 96

Compression:

Stored size: 256 Bytes

Contents

class WritingCache
  def flush
    File.open(path, "w") do |file|
      file.write(object_id.to_s)
    end
  end

  def written?
    IO.read(path) == object_id.to_s
  end

  private

  def path
    File.join(PROJECT_ROOT, 'tmp', 'written_cache')
  end
end

Version data entries

96 entries across 96 versions & 2 rubygems

Version Path
copy_tuner_client-0.19.0 spec/support/writing_cache.rb
copy_tuner_client-0.18.0 spec/support/writing_cache.rb
copy_tuner_client-0.17.1 spec/support/writing_cache.rb
copy_tuner_client-0.16.3 spec/support/writing_cache.rb
copy_tuner_client-0.16.2 spec/support/writing_cache.rb
copy_tuner_client-0.16.1 spec/support/writing_cache.rb
copy_tuner_client-0.16.0 spec/support/writing_cache.rb
copy_tuner_client-0.15.1 spec/support/writing_cache.rb
copy_tuner_client-0.15.0 spec/support/writing_cache.rb
copy_tuner_client-0.14.2 spec/support/writing_cache.rb
copy_tuner_client-0.14.1 spec/support/writing_cache.rb
copy_tuner_client-0.14.0 spec/support/writing_cache.rb
copy_tuner_client-0.13.6 spec/support/writing_cache.rb
copy_tuner_client-0.13.5 spec/support/writing_cache.rb
copy_tuner_client-0.13.3 spec/support/writing_cache.rb
copy_tuner_client-0.13.2 spec/support/writing_cache.rb
copy_tuner_client-0.13.1 spec/support/writing_cache.rb
copy_tuner_client-0.13.0 spec/support/writing_cache.rb
copy_tuner_client-0.12.0 spec/support/writing_cache.rb
copy_tuner_client-0.11.0 spec/support/writing_cache.rb