Class: YandexDetector::Result
- Inherits:
-
Object
- Object
- YandexDetector::Result
- Includes:
- Headers, Properties, Stats
- Defined in:
- lib/yandex_detector/logger.rb,
lib/yandex_detector/result.rb
Defined Under Namespace
Classes: Logger
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#request_duration ⇒ Object
readonly
Returns the value of attribute request_duration.
Instance Method Summary collapse
-
#initialize(request, timeout = 2) ⇒ Result
constructor
A new instance of Result.
Methods included from Properties
#android?, #blackberry?, #device_class, #error?, #error_message, #iphone?, #request_performed?, #success?, #text
Constructor Details
#initialize(request, timeout = 2) ⇒ Result
Returns a new instance of Result.
19 20 21 22 23 24 25 26 |
# File 'lib/yandex_detector/result.rb', line 19 def initialize(request, timeout = 2) YandexDetector::Config.timeout = timeout init_headers request @request_performed = false detect end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
17 18 19 |
# File 'lib/yandex_detector/result.rb', line 17 def data @data end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
17 18 19 |
# File 'lib/yandex_detector/result.rb', line 17 def error @error end |
#request_duration ⇒ Object (readonly)
Returns the value of attribute request_duration.
17 18 19 |
# File 'lib/yandex_detector/result.rb', line 17 def request_duration @request_duration end |