class Slack::TooManyRequestsError

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
# File lib/laziness/errors.rb, line 99
def initialize(response)
  @response = response
end

Public Instance Methods

message() click to toggle source
# File lib/laziness/errors.rb, line 103
def message
  "Retry after #{retry_after_in_seconds} seconds"
end
retry_after_in_seconds() click to toggle source
# File lib/laziness/errors.rb, line 107
def retry_after_in_seconds
  retry_after = response.headers["retry-after"]
  (retry_after || 0).to_i
end