Class: RedisGCRA::Result
- Inherits:
-
Object
- Object
- RedisGCRA::Result
- Defined in:
- lib/redis-gcra/result.rb
Instance Attribute Summary collapse
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#reset_after ⇒ Object
readonly
Returns the value of attribute reset_after.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
-
#initialize(limited:, remaining:, reset_after:, retry_after:) ⇒ Result
constructor
A new instance of Result.
- #limited? ⇒ Boolean
Constructor Details
#initialize(limited:, remaining:, reset_after:, retry_after:) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 10 |
# File 'lib/redis-gcra/result.rb', line 5 def initialize(limited:, remaining:, reset_after:, retry_after:) @limited = limited @remaining = remaining @reset_after = reset_after @retry_after = retry_after end |
Instance Attribute Details
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
3 4 5 |
# File 'lib/redis-gcra/result.rb', line 3 def remaining @remaining end |
#reset_after ⇒ Object (readonly)
Returns the value of attribute reset_after.
3 4 5 |
# File 'lib/redis-gcra/result.rb', line 3 def reset_after @reset_after end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
3 4 5 |
# File 'lib/redis-gcra/result.rb', line 3 def retry_after @retry_after end |
Instance Method Details
#limited? ⇒ Boolean
12 13 14 |
# File 'lib/redis-gcra/result.rb', line 12 def limited? !!@limited end |