Class: Topsy::RateLimitInfo

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/topsy/rate_limit_info.rb

Instance Method Summary collapse

Instance Method Details

#refresh_in_secondsObject



9
10
11
# File 'lib/topsy/rate_limit_info.rb', line 9

def refresh_in_seconds
  Time.at(reset) - Time.now
end

#resetObject



13
14
15
# File 'lib/topsy/rate_limit_info.rb', line 13

def reset
  Time.at(self[:reset]) unless self[:reset].respond_to?(:year)
end