Module: Sbuilder::Utils::CacheLines
- Defined in:
- lib/utils/cache_lines.rb
Class Method Summary collapse
-
.cache_read(cacheFile) ⇒ String
Return content of cache file.
-
.cache_write(cacheFile, data) ⇒ Object
write lines in cache file.
Class Method Details
.cache_read(cacheFile) ⇒ String
Return content of cache file
15 16 17 |
# File 'lib/utils/cache_lines.rb', line 15 def self.cache_read( cacheFile ) return File.read( cacheFile ) if !cacheFile.nil? && File.exist?( cacheFile ) end |
.cache_write(cacheFile, data) ⇒ Object
write lines in cache file
8 9 10 |
# File 'lib/utils/cache_lines.rb', line 8 def self.cache_write( cacheFile, data ) File.open( cacheFile, "w" ) { |f| f.write( data ) } end |