Sha256: d3250266b38165e386ed3e781051daa8e048def2a7887eff8aeca7e2e6dd7ef0
Contents?: true
Size: 786 Bytes
Versions: 52
Compression:
Stored size: 786 Bytes
Contents
# Copyright (C) the Rugged contributors. All rights reserved. # # This file is part of Rugged, distributed under the MIT license. # For full terms see the included LICENSE file. module Rugged class Blob class HashSignature WHITESPACE_DEFAULT = 0 WHITESPACE_IGNORE = 1 WHITESPACE_SMART = 2 end def hashsig(options = 0) @hashsig ||= HashSignature.new(self, options) end def similarity(other) other_sig = case other when HashSignature other when String HashSignature.new(other) when Blob other.hashsig else raise TypeError, "Expected a Rugged::Blob, String or Rugged::Blob::HashSignature" end HashSignature.compare(self.hashsig, other_sig) end end end
Version data entries
52 entries across 52 versions & 1 rubygems