debian-mirror-gitlab/app/models/concerns/checksummable.rb

12 lines
188 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
module Checksummable
extend ActiveSupport::Concern
class_methods do
def hexdigest(path)
Digest::SHA256.file(path).hexdigest
end
end
end