Class: Cucover::StatusCache

Inherits:
Cache
  • Object
show all
Defined in:
lib/cucover.rb

Instance Method Summary collapse

Methods inherited from Cache

#exists?, #initialize, #time, #write_to_cache

Constructor Details

This class inherits a constructor from Cucover::Cache

Instance Method Details

#last_run_statusObject



158
159
160
161
162
163
164
# File 'lib/cucover.rb', line 158

def last_run_status
  File.open(cache_filename, "r") do |file|
    file.each_line do |line|
      return line.strip
    end
  end
end

#record(status) ⇒ Object



166
167
168
169
170
# File 'lib/cucover.rb', line 166

def record(status)
  write_to_cache do |file|
    file.puts status
  end
end