Skip to content

Instantly share code, notes, and snippets.

@daniel-g
Created May 28, 2012 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniel-g/2821446 to your computer and use it in GitHub Desktop.
Save daniel-g/2821446 to your computer and use it in GitHub Desktop.
TweetStream example
TweetStream::Client.new.track('google') do |status|
# The status object is a special Hash with
# method access to its keys.
File.open('tweets.txt', 'a') do |f|
f.puts "#{status.text[0, 30]}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment