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


86
87
88
# File 'lib/digest.rb', line 86

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