Module: Utils
- Defined in:
- lib/utils.rb
Class Method Summary collapse
Class Method Details
.checksum(dir) ⇒ Object
60 61 62 63 64 |
# File 'lib/utils.rb', line 60 def checksum(dir) files = Dir["#{dir}/**/*"].reject{|f| File.directory?(f)} content = files.map{|f| File.read(f)}.join Digest::MD5.hexdigest(content) end |
.load_json(path) ⇒ Object
56 57 58 |
# File 'lib/utils.rb', line 56 def load_json(path) JSON.parse(File.read(path)) end |