Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env ruby
author = "Kurtis Rainbolt-Greene"
# created:
# encoding: utf-8
puts "A Boy And His Dog"
puts "================="
puts "It was a cold winter morning in the Forgotten Valley."
puts 'The boy looked to his dog and said, "Look there, Lucky!"'
puts '"The Temple of Golden Arches!" The dog glumly barked.'
puts "Venturing forth they climb down from the mountainside."
puts '"We are sure to find lost treasure!"'
puts 'The abandoned temple to the Golden Arches awaited.'
#!/usr/bin/env ruby
author = "Kurtis Rainbolt-Greene"
# created: 2010.09.09 21:13:07
# encoding: utf-8
# This line is a comment. A comment is used to
# document source code. This makes it easier to
# read for others, and yourself.
puts "The Wealthiest Merchant And His Daughter"
puts "========================================"
# Any part of a line after the pound sign is a comment, and not interpreted.
puts "The boy and his lucky dog traveled along the wasteland together." # Like this.
puts "They saw many things, but mostly trash and death." # These are comments
puts "The adventerous two wandered through abandoned cities and towns."
# puts "Avoiding raiders and wastelanders." # This is line is a comment.
print "One time the two happened on a small town named ", '"Wall Mart Town"'
print "\n"
### You can put multiple pound signs, but it doesn't read anything after the
## first pound sign. ##
# You can even indent the comments!
print '"Hey Lucky," ', "the boy says, ", '"Lets check this place out!"', "\n"
puts("The dog didn't think this was a good idea.")
print("But he's a dog", " what does he know!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.