class Charts
Constants
- USER_AGENT
Public Class Methods
Source
# File plugins/charts.rb, line 25 def self.charts(country:, fetch:) ChartsLookup.lookup(country, fetch: fetch)[:report] end
Source
# File plugins/charts.rb, line 19 def self.command_pattern /charts(?:\s+(.+))?$/i end
Public Instance Methods
Source
# File plugins/charts.rb, line 29 def charts(country:, fetch: method(:fetch_page)) self.class.charts(country: country, fetch: fetch) end
Source
# File plugins/charts.rb, line 37 def execute(m, country = nil) themed_flood_safe_reply(m, charts(country: country)) end
Source
# File plugins/charts.rb, line 33 def fetch_page(url) RabbotHttp.fetch(url, user_agent: USER_AGENT) end