Sha256: 3e23a19b79dcd90dfab22d67aaf3dad6730705a4d1bfea3934e4bece23402c25
Contents?: true
Size: 531 Bytes
Versions: 43
Compression:
Stored size: 531 Bytes
Contents
require 'digest/md5' module Trackman module Assets module Components module Hashable def data @data ||= read_file end def file_hash Digest::MD5.hexdigest(data) end protected def read_file begin file = File.open(path) return file.read rescue return nil ensure file.close end end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems