Module: Traptcha

Defined in:
lib/traptcha.rb,
lib/traptcha/image.rb,
lib/traptcha/engine.rb,
lib/traptcha/captcha.rb,
lib/traptcha/version.rb,
lib/traptcha/encryptors.rb,
lib/traptcha/wave_image.rb,
lib/traptcha/view_helpers.rb,
lib/traptcha/invalid_captcha.rb,
lib/traptcha/controller_helpers.rb

Defined Under Namespace

Modules: ControllerHelpers, Encryptors, ViewHelpers Classes: Captcha, CaptchasController, Engine, Image, InvalidCaptcha, WaveImage

Constant Summary collapse

VERSION =
"0.0.13"
@@default_length =
3
@@default_width =
200
@@default_height =
100
@@valid_chars =
('a'..'z').to_a + (0..9).map(&:to_s).to_a
@@ignored_chars =
%w(y k u v m n l i o 0 1 9 q e)
@@default_image_generator =
WaveImage
@@default_encryptor =
Encryptors::MD5
@@default_wave_variation =
(20..90)
@@default_wave_amplitude =
5

Class Method Summary collapse

Class Method Details

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Traptcha)

    the object that the method was called on



47
48
49
# File 'lib/traptcha.rb', line 47

def self.setup
  yield self
end