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/form_builder.rb,
lib/simple_captcha/model_helpers.rb,
lib/simple_captcha/simple_captcha_data.rb,
lib/simple_captcha/simple_captcha_data_sequel.rb,
lib/simple_captcha/simple_captcha_data_mongoid.rb

Overview

:nodoc

Defined Under Namespace

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

Constant Summary collapse

VERSION =
"0.5.0".freeze
@@image_size =
"100x28"
@@length =
5
@@image_style =
'simply_blue'
@@distortion =
'low'
@@implode =
SimpleCaptcha::ImageHelpers::DEFAULT_IMPLODE
@@refresh_format =
:jquery
@@image_magick_path =
''
@@tmp_path =
nil
@@noise =
0
@@font =
''
@@extra_response_headers =
{}
@@partial_path =
'simple_captcha/simple_captcha'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.always_passObject

Returns the value of attribute always_pass.



5
6
7
# File 'lib/simple_captcha.rb', line 5

def always_pass
  @always_pass
end

Class Method Details

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



82
83
84
# File 'lib/simple_captcha.rb', line 82

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



86
87
88
# File 'lib/simple_captcha.rb', line 86

def self.setup
  yield self
end