Object
@return [Integer]
# File lib/twitter/rate_limit.rb, line 12 def limit limit = @attrs['x-rate-limit-limit'] limit.to_i if limit end
@return [Integer]
# File lib/twitter/rate_limit.rb, line 18 def remaining remaining = @attrs['x-rate-limit-remaining'] remaining.to_i if remaining end
@return [Time]
# File lib/twitter/rate_limit.rb, line 24 def reset_at reset = @attrs['x-rate-limit-reset'] Time.at(reset.to_i) if reset end
@return [Integer]
# File lib/twitter/rate_limit.rb, line 30 def reset_in [(reset_at - Time.now).ceil, 0].max if reset_at end
Update the attributes of a RateLimit
@param attrs [Hash] @return [Twitter::RateLimit]
# File lib/twitter/rate_limit.rb, line 39 def update(attrs) @attrs.update(attrs) self end
Generated with the Darkfish Rdoc Generator 2.