class DeathByCaptcha::Captcha

Model of a Captcha returned by DeathByCaptcha API.

Attributes

captcha[RW]
is_correct[RW]
text[RW]
token[RW]

Public Instance Methods

captcha=(value) click to toggle source
# File lib/deathbycaptcha/models/captcha.rb, line 16
def captcha=(value)
  @captcha = value.to_i
end
coordinates()
Alias for: parsed_text
id() click to toggle source
# File lib/deathbycaptcha/models/captcha.rb, line 8
def id
  @captcha
end
indexes()
Alias for: parsed_text
is_correct=(value) click to toggle source
# File lib/deathbycaptcha/models/captcha.rb, line 12
def is_correct=(value)
  @is_correct = ['1', true].include?(value)
end
parsed_text() click to toggle source
# File lib/deathbycaptcha/models/captcha.rb, line 20
def parsed_text
  JSON.parse(text)
rescue
  []
end
Also aliased as: coordinates, indexes