Module: Captcher
- Extended by:
- Captcher
- Included in:
- Captcher
- Defined in:
- lib/captcher.rb,
lib/captcher/config.rb,
lib/captcher/engine.rb,
lib/captcher/version.rb,
lib/captcher/text_image.rb,
lib/captcher/base_captcha.rb,
lib/captcher/captchas/code_captcha.rb,
lib/captcher/captchas/math_captcha.rb,
lib/captcher/captchas/awesome_captcha.rb,
app/helpers/captcher/application_helper.rb,
app/controllers/captcher/captchas_controller.rb,
app/controllers/concerns/captcher/captcha_aware.rb
Defined Under Namespace
Modules: ApplicationHelper, CaptchaAware, Captchas
Classes: BaseCaptcha, CaptchasController, Config, Engine, TextImage
Constant Summary
collapse
- VERSION =
'0.1.1'
Instance Method Summary
collapse
Instance Method Details
#captcha_class ⇒ Object
24
25
26
27
28
29
|
# File 'lib/captcher.rb', line 24
def captcha_class
return @captcha_class if @captcha_class
klass = Captcher.config[:mode].to_s.camelize
@captcha_class = "Captcher::Captchas::#{klass}".constantize
end
|
#config ⇒ Object
20
21
22
|
# File 'lib/captcher.rb', line 20
def config
default_config.merge(@config)
end
|
14
15
16
17
18
|
# File 'lib/captcher.rb', line 14
def configure
@config = Captcher::Config.new
yield(@config)
self
end
|