title: ruby method 'each' not working?
body: <p>I'm trying to get a list of a users friends at random, however the "each" method doesn't seem to work when I try to use each id. Please help. </p>
  
  <p>My code:</p>
  
  <pre><code>def get_friendsids_from (user, num_to_gather)
    userid_file = File.new("friends_ids.txt","a")
    friends_list = client.friends(user).take(num_to_gather).sample
    friends_list.each {|idnumber|
      puts idnumber.followers_count
      #puts client.user(idnumber).id
      puts idnumber.screen_name
      userid_file.puts "#{idnumber.id}"  
    }
  end
  
  
  get_friendsids_from("user", 5)
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>twitter.rb:94:in `get_friendsids_from': undefined method `each' for #&lt;Twitter::User id=2343746551&gt; (NoMethodError)
      from twitter.rb:103:in `&lt;main&gt;'
  </code></pre>
  
  <p>Thank you for your time and consideration :)</p>