class Rbitter::DummyStreamClient

Public Class Methods

new(tokens) click to toggle source
# File lib/rbitter/streaming.rb, line 7
def initialize(tokens); end

Public Instance Methods

run(&operation_block) click to toggle source
# File lib/rbitter/streaming.rb, line 9
def run(&operation_block)
  internal(&operation_block)
end

Private Instance Methods

internal() { |tweet| ... } click to toggle source
# File lib/rbitter/streaming.rb, line 14
def internal(&operation_block)
  tweets = [{
    "tweetid" => 1,
    "userid" => 1,
    "replyto" => nil,
    "tweet" => "test",
    "rt_count" => 0,
    "fav_count" => 0,
    "screen_name" => "twitter",
    "date" => "2015-01-01 12:11:10",
    "media_urls" => ["https://pbs.twimg.com/media/CEPWFtgUgAEmbcV.png"],
    "web_urls" => ["https://www.google.com/"]
  }]

  tweets.each { |tweet|
    yield tweet
  }
end