Trying to build a Twitter app based on https://github.com/tweetstream/tweetstream. But at http://www.rubydoc.info/gems/tweetstream/TweetStream/Client -- how'd I go about ignoring retweets?
This works
TweetStream::Client.new.follow(14252, 53235) do |status|
puts "#{status.text}"
end
Failed attempt at excluding retweets #1
# both block arg and actual block given (SyntaxError)
TweetStream::Client.new.follow(14252, 53235).reject(&:retweet) do |status|
puts "#{status.text}"
end
Failed attempt at excluding retweets #2
# No errors but also no tweets appearing
TweetStream::Client.new.follow(14252, 53235) do |status|
unless status.retweet
puts "#{status.text}"
end
end