Class: Webstalker::Twitter
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 15 16 17 18 |
# File 'lib/webstalker/twitter.rb', line 3 def url = "http://api.twitter.com/1/favorites/#{username}.json" doc = JSON.parse(open(url).read) r = Set.new doc.each do |t| t["text"].split(/\s+/).each do |w| if w=~/^#(.+)/ r << $1 end end end r end |