I'm doing a codecademy tutorial to learn about Twitter's api. It requires us to print the response according to the following instructions
# ADD CODE TO PRINT THE TWEET IN "<screen name> - <text>" FORMAT
The following is saying that, although I'm parsing the response correctly, I'm not generating the correct output.
def print_tweet(tweet)
user = tweet["user"]["name"]
text = tweet["text"]
puts user + '-' + text
end
I'm so used to using instance variables in Rails that I'm not confident about simple Ruby like this. How should I write the function to generate output in this format?
"<screen name> - <text>"