Sha256: 4c83aa44861ecf17c17082c6013e9844bc027bf374ffef5585c24aaf760db523

Contents?: true

Size: 486 Bytes

Versions: 122

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

module ActiveSupport
  class Digest #:nodoc:
    class <<self
      def hash_digest_class
        @hash_digest_class ||= ::Digest::MD5
      end

      def hash_digest_class=(klass)
        raise ArgumentError, "#{klass} is expected to implement hexdigest class method" unless klass.respond_to?(:hexdigest)
        @hash_digest_class = klass
      end

      def hexdigest(arg)
        hash_digest_class.hexdigest(arg)[0...32]
      end
    end
  end
end

Version data entries

122 entries across 113 versions & 15 rubygems

Version Path
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.6.1/lib/active_support/digest.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.6.1/lib/active_support/digest.rb
activesupport-6.0.6.1 lib/active_support/digest.rb
activesupport-6.0.6 lib/active_support/digest.rb
activesupport-6.0.5.1 lib/active_support/digest.rb
activesupport-5.2.8.1 lib/active_support/digest.rb
activesupport-5.2.8 lib/active_support/digest.rb
activesupport-6.0.5 lib/active_support/digest.rb
activesupport-6.0.4.8 lib/active_support/digest.rb
activesupport-5.2.7.1 lib/active_support/digest.rb
activesupport-5.2.7 lib/active_support/digest.rb
activesupport-6.1.4.7 lib/active_support/digest.rb
activesupport-6.0.4.7 lib/active_support/digest.rb
activesupport-5.2.6.3 lib/active_support/digest.rb
activesupport-6.1.4.6 lib/active_support/digest.rb
activesupport-6.0.4.6 lib/active_support/digest.rb
activesupport-5.2.6.2 lib/active_support/digest.rb
activesupport-5.2.6.1 lib/active_support/digest.rb
activesupport-6.0.4.5 lib/active_support/digest.rb
activesupport-6.1.4.5 lib/active_support/digest.rb