Skip to content

Instantly share code, notes, and snippets.

@dgreenbe77
Created February 21, 2014 15:17
Show Gist options
  • Select an option

  • Save dgreenbe77/9136039 to your computer and use it in GitHub Desktop.

Select an option

Save dgreenbe77/9136039 to your computer and use it in GitHub Desktop.
Game of Thrones Hash
characters = {
"Tyrion Lannister" => "House Lannister",
"Jon Snow" => "Night's Watch",
"Hodor" => "House Stark",
"Stannis Baratheon" => "House Baratheon",
"Theon Greyjoy" => "House Greyjoy"
}
puts "Enter character name:"
character_name = gets.chomp
puts "Enter character house"
house_name = gets.chomp
characters[character_name] = house_name
characters.each {|key, value| puts "#{key} is affiliated with #{value}"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment