Sha256: d7ba50ead8a9bce199ee0257c5b3ecb5cb129d6c78901913583b89511d7a9b86

Contents?: true

Size: 441 Bytes

Versions: 1

Compression:

Stored size: 441 Bytes

Contents

module Twinkies
  class FriendSearcher
    def initialize(username, password)
      @username = username
      @password = password
    end

    def search(term)
      begin
        Twitter::Base.new(@username, @password).timeline.select do |tweet|
          tweet.text.include?('http')
        end
      rescue Twitter::CantConnect => e
        # twitter's down, who'da thunk?!
        $stderr.puts e
        []
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pat-maddox-twinkies-0.1.5 lib/twinkies/friend_searcher.rb