Class: Ondotori::WebAPI::Api::RateLimit
- Inherits:
-
Object
- Object
- Ondotori::WebAPI::Api::RateLimit
- Defined in:
- lib/ondotori/webapi/api/rate_limit.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#reset ⇒ Object
readonly
Returns the value of attribute reset.
Instance Method Summary collapse
-
#initialize(response) ⇒ RateLimit
constructor
A new instance of RateLimit.
Constructor Details
#initialize(response) ⇒ RateLimit
Returns a new instance of RateLimit.
9 10 11 12 13 |
# File 'lib/ondotori/webapi/api/rate_limit.rb', line 9 def initialize(response) @limit = response.get_fields("X-RateLimit-Limit") @reset = response.get_fields("X-RateLimit-Reset") @remaining = response.get_fields("X-RateLimit-Remaining") end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
7 8 9 |
# File 'lib/ondotori/webapi/api/rate_limit.rb', line 7 def limit @limit end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
7 8 9 |
# File 'lib/ondotori/webapi/api/rate_limit.rb', line 7 def remaining @remaining end |
#reset ⇒ Object (readonly)
Returns the value of attribute reset.
7 8 9 |
# File 'lib/ondotori/webapi/api/rate_limit.rb', line 7 def reset @reset end |