def handle_stream_object(object, type)
      opts = {
          stream_type: type
      }
      case object
        when Twitter::Streaming::FriendList
          # object: Array with IDs
          do_callbacks :friend_list, object
        when Twitter::Tweet
          # object: Twitter::Tweet
          is_mention = (object.user.screen_name != $bot[:config][:screen_name] and object.text.include?("@" + $bot[:config][:screen_name]) and not object.retweet?)
          do_callbacks :retweet, object, opts if object.retweet? and object.retweeted_tweet.user.screen_name == $bot[:config][:screen_name]
          do_callbacks :mention, object, opts if is_mention
          do_callbacks :tweet, object, opts.merge({ mention: is_mention, retweet: object.retweet?, favorite: object.favorited? })
        when Twitter::Streaming::Event
          case object.name
            when :follow, :favorite
              # :follow   -- object: Twitter::Streaming::Event(name: :follow,   source: Twitter::User, target: Twitter::User)
              # :favorite -- object: Twitter::Streaming::Event(name: :favorite, source: Twitter::User, target: Twitter::User, target_object: Twitter::Tweet)
              do_callbacks object.name, object, opts
            else
              puts "no handler for #{object.class.to_s}/#{object.name}\n  -- object data:"
              require 'pp'
              pp object
              do_callbacks object.name, object, opts
          end
        when Twitter::DirectMessage
          do_direct_message object, opts
        when Twitter::Streaming::DeletedTweet
          do_callbacks :deleted, object, opts
        else
          puts "no handler for #{object.class.to_s}\n  -- object data:"
          require 'pp'
          pp object
      end
    end
def handle_stream_object(object, type)
      opts = {
          stream_type: type
      }
      case object
        when Twitter::Streaming::FriendList
          # object: Array with IDs
          do_callbacks :friend_list, object
        when Twitter::Tweet
          # object: Twitter::Tweet
          is_mention = (object.user.screen_name != $bot[:config][:screen_name] and object.text.include?("@" + $bot[:config][:screen_name]) and not object.retweet?)
          do_callbacks :retweet, object, opts if object.retweet? and object.retweeted_tweet.user.screen_name == $bot[:config][:screen_name]
          do_callbacks :mention, object, opts if is_mention
          do_callbacks :tweet, object, opts.merge({ mention: is_mention, retweet: object.retweet?, favorite: object.favorited? })
        when Twitter::Streaming::Event
          case object.name
            when :follow, :favorite
              # :follow   -- object: Twitter::Streaming::Event(name: :follow,   source: Twitter::User, target: Twitter::User)
              # :favorite -- object: Twitter::Streaming::Event(name: :favorite, source: Twitter::User, target: Twitter::User, target_object: Twitter::Tweet)
              do_callbacks object.name, object, opts
            else
              puts "no handler for #{object.class.to_s}/#{object.name}\n  -- object data:"
              require 'pp'
              pp object
              do_callbacks object.name, object, opts
          end
        when Twitter::DirectMessage
          do_direct_message object, opts
        when Twitter::Streaming::DeletedTweet
          do_callbacks :deleted, object, opts
        else
          puts "no handler for #{object.class.to_s}\n  -- object data:"
          require 'pp'
          pp object
      end
    end
Handles a object yielded from a Twitter::Streaming::Client.
 @param object [Object] The object yielded from a Twitter::Streaming::Client connection.
 @param type [Symbol] The type of the streamer.  Should be either :user or :filter.