Sha256: b006801af2d39544c457d39542ca01b9f9f11776eb26a9492171c366f6555ad2
Contents?: true
Size: 299 Bytes
Versions: 3
Compression:
Stored size: 299 Bytes
Contents
# frozen_string_literal: true module Hashtastic class ListHasher def self.call(values, &block) hasher = Digest::SHA3.new(256) values.each do |value| value = block.call(value) if block hasher.update(value.to_s) end hasher.hexdigest end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hashtastic-0.3.0 | lib/hashtastic/list_hasher.rb |
hashtastic-0.2.0 | lib/hashtastic/list_hasher.rb |
hashtastic-0.1.2 | lib/hashtastic/list_hasher.rb |