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.10.0 spec/support/writing_cache.rb
copy_tuner_client-0.9.0 spec/support/writing_cache.rb
copy_tuner_client-0.8.1 spec/support/writing_cache.rb
copy_tuner_client-0.8.0 spec/support/writing_cache.rb
copy_tuner_client-0.7.0 spec/support/writing_cache.rb
copy_tuner_client-0.6.2 spec/support/writing_cache.rb
copy_tuner_client-0.6.1 spec/support/writing_cache.rb
copy_tuner_client-0.5.3 spec/support/writing_cache.rb
copy_tuner_client-0.5.2 spec/support/writing_cache.rb
copy_tuner_client-0.5.1 spec/support/writing_cache.rb
copy_tuner_client-0.5.0 spec/support/writing_cache.rb
copy_tuner_client-0.5.0.pre spec/support/writing_cache.rb
copy_tuner_client-0.4.12 spec/support/writing_cache.rb
copy_tuner_client-0.4.11 spec/support/writing_cache.rb
copy_tuner_client-0.4.10 spec/support/writing_cache.rb
copy_tuner_client-0.4.9 spec/support/writing_cache.rb
copy_tuner_client-0.4.8 spec/support/writing_cache.rb
copy_tuner_client-0.4.7 spec/support/writing_cache.rb
copy_tuner_client-0.4.6 spec/support/writing_cache.rb
copy_tuner_client-0.4.5 spec/support/writing_cache.rb