Module: SimpleCaptcha

Defined in:
lib/simple_captcha/view.rb,
lib/simple_captcha.rb,
lib/simple_captcha/image.rb,
lib/simple_captcha/utils.rb,
lib/simple_captcha/engine.rb,
lib/simple_captcha/version.rb,
lib/simple_captcha/controller.rb,
lib/simple_captcha/middleware.rb,
lib/simple_captcha/model_helpers.rb,
lib/simple_captcha/storage/mongoid.rb,
lib/simple_captcha/hooks/form_builder.rb,
lib/simple_captcha/storage/active_record.rb

Overview

:nodoc

Defined Under Namespace

Modules: ControllerHelpers, FormBuilder, ImageHelpers, ModelHelpers, SimpleForm, Utils, ViewHelper Classes: Engine, Middleware, SimpleCaptchaData

Constant Summary collapse

VERSION =
"0.8.1".freeze
@@image_size =
"130x40"
@@length =
5
@@charset =
'23456789abcdefghkmnpqrstwxyz'
@@image_style =
'simply_blue'
@@image_color =
nil
@@distortion =
'low'
@@image_magick_path =
''
@@tmp_path =
nil
@@pointsize =
30
@@wave_count =
10

Class Method Summary collapse

Class Method Details

.add_image_style(name, params = []) ⇒ Object



71
72
73
# File 'lib/simple_captcha.rb', line 71

def self.add_image_style(name, params = [])
  SimpleCaptcha::ImageHelpers.image_styles.update(name.to_s => params)
end

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

Yields:

  • (_self)

Yield Parameters:

  • _self (SimpleCaptcha)

    the object that the method was called on



75
76
77
# File 'lib/simple_captcha.rb', line 75

def self.setup
  yield self
end