Exception: Redd::Error::RateLimited

Inherits:
Redd::Error
  • Object
show all
Defined in:
lib/redd/error.rb

Instance Attribute Summary collapse

Attributes inherited from Redd::Error

#body, #code, #headers

Instance Method Summary collapse

Methods inherited from Redd::Error

from_response, parse_error

Constructor Details

#initialize(env, time) ⇒ RateLimited

Returns a new instance of RateLimited.



95
96
97
98
99
100
# File 'lib/redd/error.rb', line 95

def initialize(env, time)
  @code = env.status
  @headers = env.response_headers
  @body = env.body
  @time = time
end

Instance Attribute Details

#timeObject (readonly)

Returns the value of attribute time.



93
94
95
# File 'lib/redd/error.rb', line 93

def time
  @time
end