Class: StreamChat::StreamRateLimits
- Inherits:
-
Object
- Object
- StreamChat::StreamRateLimits
- 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
Returns a new instance of StreamRateLimits.
11 12 13 14 15 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 11 def initialize(limit, remaining, reset) @limit = limit.to_i @remaining = remaining.to_i @reset = Time.at(reset.to_i) end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
7 8 9 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 7 def limit @limit end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
8 9 10 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 8 def remaining @remaining end |
#reset ⇒ Object (readonly)
Returns the value of attribute reset.
9 10 11 |
# File 'lib/stream-chat/stream_rate_limits.rb', line 9 def reset @reset end |