Class: StreamChat::StreamRateLimits

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/stream-chat/stream_rate_limits.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#limitObject (readonly)

Returns the value of attribute limit.



9
10
11
# File 'lib/stream-chat/stream_rate_limits.rb', line 9

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



12
13
14
# File 'lib/stream-chat/stream_rate_limits.rb', line 12

def remaining
  @remaining
end

#resetObject (readonly)

Returns the value of attribute reset.



15
16
17
# File 'lib/stream-chat/stream_rate_limits.rb', line 15

def reset
  @reset
end