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.0.9 spec/support/writing_cache.rb
copy_tuner_client-0.0.8 spec/support/writing_cache.rb
copy_tuner_client-0.0.7 spec/support/writing_cache.rb
copy_tuner_client-0.0.6 spec/support/writing_cache.rb
copy_tuner_client-0.0.5 spec/support/writing_cache.rb
copy_tuner_client-0.0.4 spec/support/writing_cache.rb
copy_tuner_client-0.0.3 spec/support/writing_cache.rb
copy_tuner_client-0.0.2 spec/support/writing_cache.rb
copy_tuner_client-0.0.1 spec/support/writing_cache.rb
copycopter_client-2.0.1 spec/support/writing_cache.rb
copycopter_client-2.0.0 spec/support/writing_cache.rb
copycopter_client-1.1.2 spec/support/writing_cache.rb
copycopter_client-1.1.1 spec/support/writing_cache.rb
copycopter_client-1.1.0 spec/support/writing_cache.rb
copycopter_client-1.0.4 spec/support/writing_cache.rb
copycopter_client-1.0.3 spec/support/writing_cache.rb