class THA::Fetcher

Public Class Methods

new(opts = {}) click to toggle source
# File lib/tcs-handles-aggregator/fetcher.rb, line 4
def initialize(opts = {})
        @connection = opts[:connection]
        @users = opts[:user].nil? ? THA::Handles.list : [opts[:user]]
end

Public Instance Methods

get() click to toggle source
# File lib/tcs-handles-aggregator/fetcher.rb, line 9
def get
        hsh = Hash.new
        @users.each do |user|
          hsh[user] = @connection.get_all_tweets(user).collect {|tweet| tweet.text}
        end
        hsh
end