Class: JarTools::Diff::UniformFile

Inherits:
Object
  • Object
show all
Defined in:
lib/jartools/diff.rb

Direct Known Subclasses

ActualFile, ExtractedFile

Instance Method Summary collapse

Instance Method Details

#contentsObject



147
148
149
150
151
152
153
# File 'lib/jartools/diff.rb', line 147

def contents
  @contents ||= if RUBY_VERSION =~ /1.8/
                  File.read(readable_filename)
                else
                  File.read(readable_filename, :encoding => 'binary')
                end
end

#sha1Object



155
156
157
# File 'lib/jartools/diff.rb', line 155

def sha1
  @sha1 ||= Digest::SHA1.hexdigest(contents)
end