Top Level Namespace

Defined Under Namespace

Modules: Digest

Instance Method Summary collapse

Instance Method Details

#Digest(name) ⇒ Object

call-seq:

Digest(name) -> digest_subclass

Returns a Digest subclass by name.

require 'digest'

Digest("MD5")
# => Digest::MD5

Digest("Foo")
# => LoadError: library not found for class Digest::Foo -- digest/foo

88
89
90
# File 'lib/digest.rb', line 88

def Digest(name)
  Digest.const_get(name)
end