Skip to content

Instantly share code, notes, and snippets.

@pzaich
Created June 20, 2012 23:58
Show Gist options
  • Select an option

  • Save pzaich/2963031 to your computer and use it in GitHub Desktop.

Select an option

Save pzaich/2963031 to your computer and use it in GitHub Desktop.
follower.rb
#gems
require 'twitter'
require 'csv'
class Follower_Data
def initialize(filename)
puts "Twitter_Follower Initialized."
@list_file = CSV.open(filename, {:headers => true, :header_converters => :symbol})
end
def retrieve_id(social_network)
@list_to_be_followed = @list_file.collect do |line|
if line[social_network]
line[:name] + " " + line[social_network]
end
end
puts @list_to_be_followed
end
end
twitter = Follower_Data.new("Summer_Cohort.csv")
twitter.retrieve_id(:linked_in)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment