Class: StreamChat::StreamRateLimits

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#limitObject (readonly)

Returns the value of attribute limit.



7
8
9
# File 'lib/stream-chat/stream_rate_limits.rb', line 7

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



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

def remaining
  @remaining
end

#resetObject (readonly)

Returns the value of attribute reset.



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

def reset
  @reset
end