Class: Webstalker::Reddit
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Webstalker::Base
Instance Method Details
#tags ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/webstalker/reddit.rb', line 3 def url = "http://reddit.com/user/#{username}.json" doc = JSON.parse(open(url).read) r = Set.new doc['data']['children'].each do |t| r << t['data']['subreddit'] end r end |