I am using the twitter gem to interact with the twitter API.
My output for approach 1, below, is what you'd expect, the last 5 tweets containing the President's name.
client.search("to: Donald Trump", result_type: "recent").take(5).each do |tweet|
puts tweet.text
end
With this second approach, though, storing client.search into an array and then displaying it, I don't get plain text.
trumptweets = client.search("to: Donald Trump", result_type:"recent").take(5)
puts trumptweets
Output: #<Twitter::Tweet:0x007fbbacb61060>
#<Twitter::Tweet:0x007fbbacb61010>
#<Twitter::Tweet:0x007fbbacb60f98>
#<Twitter::Tweet:0x007fbbacb60f70>
#<Twitter::Tweet:0x007fbbacb60ed0>
How do I a) convert the output from approach #2 to actual text or b) why does looping over a hash seem to be the only way to do this?