Skip to content

Instantly share code, notes, and snippets.

@daniel-g
Created May 28, 2012 22:18
Show Gist options
  • 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