Class: Cucover::SourceFileCache

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

Instance Method Summary collapse

Methods inherited from Cache

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

Constructor Details

This class inherits a constructor from Cucover::Cache

Instance Method Details

#any_dirty_files?Boolean

Returns:

  • (Boolean)


186
187
188
# File 'lib/cucover.rb', line 186

def any_dirty_files?
  not dirty_files.empty?
end

#save(analyzed_files) ⇒ Object



180
181
182
183
184
# File 'lib/cucover.rb', line 180

def save(analyzed_files)
  write_to_cache do |file|
    file.puts analyzed_files
  end
end

#source_filesObject



190
191
192
193
194
195
196
197
198
# File 'lib/cucover.rb', line 190

def source_files
  result = []
  File.open(cache_filename, "r") do |file|
    file.each_line do |line|
      result.push line
    end
  end
  result
end