Class: DeathByCaptcha::Captcha
- Defined in:
- lib/deathbycaptcha/models/captcha.rb
Overview
Model of a Captcha returned by DeathByCaptcha API.
Instance Attribute Summary collapse
-
#captcha ⇒ Object
Returns the value of attribute captcha.
-
#is_correct ⇒ Object
Returns the value of attribute is_correct.
-
#text ⇒ Object
(also: #token)
Returns the value of attribute text.
Instance Method Summary collapse
- #id ⇒ Object
- #parsed_text ⇒ Object (also: #coordinates, #indexes)
Methods inherited from Model
Constructor Details
This class inherits a constructor from DeathByCaptcha::Model
Instance Attribute Details
#captcha ⇒ Object
Returns the value of attribute captcha.
6 7 8 |
# File 'lib/deathbycaptcha/models/captcha.rb', line 6 def captcha @captcha end |
#is_correct ⇒ Object
Returns the value of attribute is_correct.
6 7 8 |
# File 'lib/deathbycaptcha/models/captcha.rb', line 6 def is_correct @is_correct end |
#text ⇒ Object Also known as: token
Returns the value of attribute text.
6 7 8 |
# File 'lib/deathbycaptcha/models/captcha.rb', line 6 def text @text end |
Instance Method Details
#id ⇒ Object
8 9 10 |
# File 'lib/deathbycaptcha/models/captcha.rb', line 8 def id @captcha end |
#parsed_text ⇒ Object Also known as: coordinates, indexes
20 21 22 23 24 |
# File 'lib/deathbycaptcha/models/captcha.rb', line 20 def parsed_text JSON.parse(text) rescue [] end |