CAPTCHA stands for "Completely Automated Public Turing Test to Tell Computers and Humans Apart." This module provides classes that allow web sites to use randomly generated images, in concert with randomly generated keys and encrypted digests, to do such things as preventing automated registrations.

Classes and Modules
Class CAPTCHA::ObfuscatedImage
Class CAPTCHA::Rectangle
Class CAPTCHA::Web
Public Class methods

Determine the default template path. It first checks to see if there is a gem version of Ruby/CAPTCHA installed, and uses that as the base path. If there is no gem installed, it uses /usr/share/captcha/templates.

    # File lib/captcha.rb, line 48
48:   def self.default_template_path
49:     begin
50:       require 'rubygems'
51:       matches = "captcha", "=#{VERSION}" )
52:       return File.join( matches.last.full_gem_path, "/data/captcha/templates" )
53:     rescue Exception => e
54:       return "/usr/share/captcha/templates"
55:     end
56:   end