Class: EasyCaptcha::Captcha
- Inherits:
-
Object
- Object
- EasyCaptcha::Captcha
- Defined in:
- lib/easy_captcha/captcha.rb
Overview
captcha generation class
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
code for captcha generation.
-
#image ⇒ Object
readonly
blob of generated captcha image.
Instance Method Summary collapse
-
#initialize(code) ⇒ Captcha
constructor
generate captcha by code.
-
#inspect ⇒ Object
:nodoc:.
Constructor Details
#initialize(code) ⇒ Captcha
generate captcha by code
11 12 13 14 |
# File 'lib/easy_captcha/captcha.rb', line 11 def initialize code @code = code generate_captcha end |
Instance Attribute Details
#code ⇒ Object (readonly)
code for captcha generation
6 7 8 |
# File 'lib/easy_captcha/captcha.rb', line 6 def code @code end |
#image ⇒ Object (readonly)
blob of generated captcha image
8 9 10 |
# File 'lib/easy_captcha/captcha.rb', line 8 def image @image end |
Instance Method Details
#inspect ⇒ Object
:nodoc:
16 17 18 |
# File 'lib/easy_captcha/captcha.rb', line 16 def inspect #:nodoc: "<EasyCaptcha::Captcha @code=#{code}>" end |