Class: YandexDetector::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex_detector/config.rb

Constant Summary collapse

API_URL =

URL of API service according documentation http://api.yandex.ru/detector/doc/dg/concepts/detector-request.xml

'http://phd.yandex.net/detect/'
ERROR_TAG_NAME =

Error’s tag name according documentation http://api.yandex.ru/detector/doc/dg/concepts/detector-response.xml

'yandex-mobile-info-error'
@@timeout =
2

Class Method Summary collapse

Class Method Details

.timeoutInteger

Returns timeout in seconds to API service call.

Returns:

  • (Integer)

    timeout in seconds to API service call



14
15
16
# File 'lib/yandex_detector/config.rb', line 14

def self.timeout
  @@timeout
end

.timeout=(timeout_value = nil) ⇒ Object

Set timeout value to API service call in seconds only if integer value passed

Parameters:

  • timeout_value (Integer) (defaults to: nil)

    specify timeout value in seconds



20
21
22
# File 'lib/yandex_detector/config.rb', line 20

def self.timeout=(timeout_value = nil)
  @@timeout = timeout_value if timeout_value.is_a?(Integer)
end