Class: AntiCaptcha::ImageToTextSolution

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

Instance Attribute Summary collapse

Attributes inherited from Solution

#api_response, #task_result

Instance Method Summary collapse

Constructor Details

#initialize(task_result = nil) ⇒ ImageToTextSolution

Returns a new instance of ImageToTextSolution.



5
6
7
8
9
10
11
12
# File 'lib/anti_captcha/models/image_to_text_solution.rb', line 5

def initialize(task_result = nil)
  super

  if task_result
    @url  = task_result.api_result['solution']['url']
    @text = task_result.api_result['solution']['text']
  end
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



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

def text
  @text
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end