class Suppository::Checksummed
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/suppository/checksummed.rb, line 10 def initialize(path) @path = File.expand_path(path) end
Public Instance Methods
md5()
click to toggle source
# File lib/suppository/checksummed.rb, line 14 def md5 @md5 ||= Digest::MD5.file(@path).hexdigest end
sha1()
click to toggle source
# File lib/suppository/checksummed.rb, line 18 def sha1 @sha1 ||= Digest::SHA1.file(@path).hexdigest end
sha2()
click to toggle source
# File lib/suppository/checksummed.rb, line 22 def sha2 @sha2 ||= Digest::SHA2.file(@path).hexdigest end