Class | CAPTCHA::Web |
In: |
lib/captcha.rb
|
Parent: | Object |
This class provides a way to use the ObfuscatedImage on a web page, in concert with an encrypted digest and key.
VALID_CONFIG_VARS | = | { :key_length=>KEY_LENGTH, :font=>FONT, :font_size=>FONT_SIZE, :image_dir=>IMAGE_DIR, :image_uri=>IMAGE_URI, :clean_up_interval=>CLEAN_UP_INTERVAL, :template_file=>TEMPLATE, :use_chars=>USE_CHARS, :x_spacing=>X_SPACING, :y_wiggle=>Y_WIGGLE, :rotation=>ROTATION } | the list of variables that may be validly specified in a configuration file, or as an option to ‘new‘ |
clean_up_interval | [RW] | |
digest | [R] | |
font | [RW] | |
font_size | [RW] | |
image_dir | [RW] | |
image_uri | [RW] | |
key | [R] | |
rotation | [RW] | |
template_file | [RW] | |
x_spacing | [RW] | |
y_wiggle | [RW] |
Test the given key against the given digest. If the digest was created from the given key, return true, otherwise return false.
Look in the image directory, deleting any images there that are more than ‘clean_up_interval’ seconds old.
Get the name of the image file. This will generate the file name if it has not yet been generated.
Get the ObfuscatedImage that will be shown on the page. If the image has not yet been created, this will create it.