TweetStream:排除转推

时间:2016-06-21 10:19:57

标签: ruby-on-rails twitter tweetstream

尝试根据https://github.com/tweetstream/tweetstream构建Twitter应用。但是在http://www.rubydoc.info/gems/tweetstream/TweetStream/Client - 我怎么会忽略转发?

这有效

TweetStream::Client.new.follow(14252, 53235) do |status|
  puts "#{status.text}"
end

尝试排除转推#1

失败
# both block arg and actual block given (SyntaxError)

TweetStream::Client.new.follow(14252, 53235).reject(&:retweet) do |status|
  puts "#{status.text}"
end

尝试排除转推#2

失败
# No errors but also no tweets appearing

TweetStream::Client.new.follow(14252, 53235) do |status|
  unless status.retweet
    puts "#{status.text}"
  end
end

0 个答案:

没有答案