Class: AntiCaptcha::HCaptchaSolution

Inherits:
Solution show all
Defined in:
lib/anti_captcha/models/h_captcha_solution.rb

Instance Attribute Summary collapse

Attributes inherited from Solution

#api_response, #task_result

Instance Method Summary collapse

Constructor Details

#initialize(task_result = nil) ⇒ HCaptchaSolution

Returns a new instance of HCaptchaSolution.



7
8
9
10
11
12
13
14
# File 'lib/anti_captcha/models/h_captcha_solution.rb', line 7

def initialize(task_result = nil)
  super

  if task_result
    @token = task_result.api_result['solution']['gRecaptchaResponse']
    @g_recaptcha_response = token
  end
end

Instance Attribute Details

#g_recaptcha_responseObject

Deprecated



3
4
5
# File 'lib/anti_captcha/models/h_captcha_solution.rb', line 3

def g_recaptcha_response
  @g_recaptcha_response
end

#tokenObject

Returns the value of attribute token.



4
5
6
# File 'lib/anti_captcha/models/h_captcha_solution.rb', line 4

def token
  @token
end