Class: TxOcr::Text
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #encoded_image_url ⇒ Object
-
#initialize(file_url, ocr_type = 'GeneralBasicOCR') ⇒ Text
constructor
A new instance of Text.
- #remote_image_url ⇒ Object
Methods inherited from Base
#encode_parameters, #fixed_paramaters, #full_request_url, #indent_result, #json, #orginal_parameters, #raw_result, #region, #request_object, #request_params, #secret_id, #secret_key, #signature, #string_for_sign, #to_params, #url
Constructor Details
#initialize(file_url, ocr_type = 'GeneralBasicOCR') ⇒ Text
Returns a new instance of Text.
5 6 7 8 |
# File 'lib/tx_ocr/text.rb', line 5 def initialize(file_url, ocr_type = 'GeneralBasicOCR') @ocr_type = ocr_type @file_url = file_url end |
Instance Method Details
#encoded_image_url ⇒ Object
14 15 16 |
# File 'lib/tx_ocr/text.rb', line 14 def encoded_image_url URI.encode(@file_url) end |
#remote_image_url ⇒ Object
10 11 12 |
# File 'lib/tx_ocr/text.rb', line 10 def remote_image_url @file_url end |