pastebin

Paste Search Dynamic
Recent pastes
alistair
  1. # Here is how you could initialize a set of tweets from Superman with a Hash.
  2. # The hash key is the user name (superman) appended with a sequential integer
  3. # number that we will start at 1. The combination of the user name
  4. # and the next integer number provide a unique hash key for each Tweet.
  5.  
  6. alistair = {
  7. "alistair1" => "Watch as I thrash our enemies with the mighty power of floral arrangements!",
  8. "alistair2" => "Just so you know, if the king ever asks me to put on a dress and dance the Remigold, I'm drawing the line.",
  9. "alistair3" => "You know, one good thing about the Blight is how it brings people together.",
  10. "alistair4" => "Swooping is bad.",
  11. "alistair5" => "Tell me... have you ever licked a lamp post in winter?",
  12. }
  13.  
  14. # Let's print our Tweets ... I put the key between parentheses to make it stand out
  15.  
  16. printf "A few tweets from Dragon Age's comic relief, Alistair: \n\n"
  17. alistair.each { |key, val| puts "(#{key}) #{val}" }
  18.  
  19. # Now let us set up our hash of Tweets for Varric
  20.  
  21. varric = {
  22. "varric1" => "Dear Varric, please learn to parry. Love, your innards.",
  23. "varric2" => "'I don't like this?'That's right up there with 'What could possibly go wrong?'",
  24. "varric3" => "How do you know that he doesn't know that you know that he knows that you know. You know?",
  25. "varric4" => "Once again I'm falsely accused of whatever I'm accused of, falsely.",
  26. "varric5" => "There's power in stories. That's all history is, the best tales. The ones that last. Might as well be mine."
  27. }
  28.  
  29. # Let's print out all the Tweets from Varric
  30.  
  31. printf "\n\nA few tweets from our favorite dwarf: \n\n"
  32. varric.each { |key, val| puts "(#{key}) #{val}" }
Parsed in 0.013 seconds