Exception: Hikvision::ResponseError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Hikvision::ResponseError
- Defined in:
- lib/hikvision/isapi.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #status_code ⇒ Object
- #status_string ⇒ Object
- #sub_status_code ⇒ Object
Constructor Details
#initialize(xml) ⇒ ResponseError
Returns a new instance of ResponseError.
6 7 8 9 |
# File 'lib/hikvision/isapi.rb', line 6 def initialize(xml) @xml = xml super(status_string) end |
Instance Method Details
#status_code ⇒ Object
11 12 13 |
# File 'lib/hikvision/isapi.rb', line 11 def status_code @xml.at_xpath('ResponseStatus/statusCode').inner_html.to_i end |
#status_string ⇒ Object
15 16 17 |
# File 'lib/hikvision/isapi.rb', line 15 def status_string @xml.at_xpath('ResponseStatus/statusString').inner_html end |
#sub_status_code ⇒ Object
19 20 21 |
# File 'lib/hikvision/isapi.rb', line 19 def sub_status_code @xml.at_xpath('ResponseStatus/subStatusCode').inner_html end |