Module: ValidatesCaptcha

Defined in:
lib/validates_captcha.rb,
lib/validates_captcha/version.rb,
lib/validates_captcha/test_case.rb,
lib/validates_captcha/form_helper.rb,
lib/validates_captcha/form_builder.rb,
lib/validates_captcha/model_validation.rb,
lib/validates_captcha/provider/question.rb,
lib/validates_captcha/controller_validation.rb,
lib/validates_captcha/provider/static_image.rb,
lib/validates_captcha/image_generator/simple.rb,
lib/validates_captcha/provider/dynamic_image.rb,
lib/validates_captcha/string_generator/simple.rb,
lib/validates_captcha/symmetric_encryptor/simple.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ControllerValidation, FormBuilder, FormHelper, ImageGenerator, ModelValidation, Provider, StringGenerator, SymmetricEncryptor, VERSION Classes: TestCase

Constant Summary collapse

@@provider =
nil

Class Method Summary collapse

Class Method Details

.providerObject

Returns the current captcha challenge provider. Defaults to an instance of the ValidatesCaptcha::Provider::Question class.



66
67
68
# File 'lib/validates_captcha.rb', line 66

def provider
  @@provider ||= Provider::Question.new
end

.provider=(provider) ⇒ Object

Sets the current captcha challenge provider. Used to set a custom provider.



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

def provider=(provider)
  @@provider = provider
end

.versionObject

Returns Validates Captcha’s current version number.



60
61
62
# File 'lib/validates_captcha.rb', line 60

def version
  ValidatesCaptcha::VERSION::STRING
end