Sha256: bf94b06a0ace83eb59d5613c33294bb1b1c026fb69ab1c07f0b6e2d7560ea301

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

module Sbuilder
  
  module Utils

    module CacheLines

      # write lines in cache file
      def self.cache_write( cacheFile, data  )
        File.open( cacheFile, "w" ) { |f| f.write( data ) }
      end

      # Return content of cache file
      # 
      # @return [String] cached Strinng, nil if not cached
      def self.cache_read( cacheFile )
        return File.read( cacheFile ) if !cacheFile.nil? && File.exist?( cacheFile )
      end
      
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tla-sbuilder-0.2.2 lib/utils/cache_lines.rb
tla-sbuilder-0.2.1 lib/utils/cache_lines.rb