Class: StreamChat::StreamRateLimits
- Inherits:
-
Object
- Object
- StreamChat::StreamRateLimits
- Extended by:
- T::Sig
- Defined in:
- lib/stream-chat/stream_rate_limits.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(limit, remaining, reset) ⇒ StreamRateLimits
constructor
A new instance of StreamRateLimits.
Constructor Details
#initialize(limit, remaining, reset) ⇒ StreamRateLimits
18 19 20 21 22 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 18 def initialize(limit, remaining, reset) @limit = T.let(limit.to_i, Integer) @remaining = T.let(remaining.to_i, Integer) @reset = T.let(Time.at(reset.to_i), Time) end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
9 10 11 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 9 def limit @limit end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
12 13 14 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 12 def remaining @remaining end |
#reset ⇒ Object (readonly)
Returns the value of attribute reset.
15 16 17 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 15 def reset @reset end |