In Files

  • digest/lib/digest.rb

Parent

Methods

Object

Public Instance Methods

Digest(name) → digest_subclass click to toggle source

Returns a Digest subclass by name.

require 'digest'

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

Digest("Foo")
# => LoadError: library not found for class Digest::Foo -- digest/foo
 
               # File digest/lib/digest.rb, line 86
def Digest(name)
  Digest.const_get(name)
end