Class: Prowler::Success
- Inherits:
-
Object
- Object
- Prowler::Success
- Defined in:
- lib/prowler/response.rb
Instance Attribute Summary collapse
-
#remaining ⇒ Object
readonly
The number of remaining requests until the counter is reset.
-
#reset_date ⇒ Object
readonly
The time when the request counter will be reset.
-
#status ⇒ Object
readonly
The status code returned by the Prowl API - always 200.
Instance Method Summary collapse
-
#initialize(document) ⇒ Success
constructor
:nodoc:.
Constructor Details
#initialize(document) ⇒ Success
:nodoc:
27 28 29 30 31 32 33 |
# File 'lib/prowler/response.rb', line 27 def initialize(document) #:nodoc: success = document.elements["prowl/success"] @status = success.attributes["code"].to_i @remaining = success.attributes["remaining"].to_i @reset_date = Time.at(success.attributes["resetdate"].to_i) end |
Instance Attribute Details
#remaining ⇒ Object (readonly)
The number of remaining requests until the counter is reset
22 23 24 |
# File 'lib/prowler/response.rb', line 22 def remaining @remaining end |
#reset_date ⇒ Object (readonly)
The time when the request counter will be reset
25 26 27 |
# File 'lib/prowler/response.rb', line 25 def reset_date @reset_date end |
#status ⇒ Object (readonly)
The status code returned by the Prowl API - always 200
19 20 21 |
# File 'lib/prowler/response.rb', line 19 def status @status end |