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
12 13 14 15 |
# File 'lib/easy_captcha/captcha.rb', line 12 def initialize(code) @code = code generate_captcha end |
Instance Attribute Details
#code ⇒ Object (readonly)
code for captcha generation
7 8 9 |
# File 'lib/easy_captcha/captcha.rb', line 7 def code @code end |
#image ⇒ Object (readonly)
blob of generated captcha image
9 10 11 |
# File 'lib/easy_captcha/captcha.rb', line 9 def image @image end |
Instance Method Details
#inspect ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/easy_captcha/captcha.rb', line 17 def inspect #:nodoc: "<EasyCaptcha::Captcha @code=#{code}>" end |