Class: VisualCaptcha::Challenge
- Inherits:
-
Object
- Object
- VisualCaptcha::Challenge
- Defined in:
- lib/visualcaptcha.rb
Instance Attribute Summary collapse
-
#answer ⇒ Object
Returns the value of attribute answer.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(answer, options = nil) ⇒ Challenge
constructor
A new instance of Challenge.
Constructor Details
#initialize(answer, options = nil) ⇒ Challenge
Returns a new instance of Challenge.
29 30 31 32 33 34 |
# File 'lib/visualcaptcha.rb', line 29 def initialize(answer, =nil) @answer = answer @options = @options << answer @options.shuffle! end |
Instance Attribute Details
#answer ⇒ Object
Returns the value of attribute answer.
27 28 29 |
# File 'lib/visualcaptcha.rb', line 27 def answer @answer end |
#options ⇒ Object
Returns the value of attribute options.
27 28 29 |
# File 'lib/visualcaptcha.rb', line 27 def @options end |