Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (10 sloc) 0.423 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/ruby

require "yaml"
require "plural"

data = YAML.load(File.read("data.yml"))
@lists = %w{military_rank extreme_name animal_name female_name location}

@lists.each do |list|
  eval("@#{list.plural} = data[ \"#{list.plural}\" ]")
  eval("@#{list} = @#{list.plural}[ rand( @#{list.plural}.length ) ]")
end

puts "#{@military_rank} #{@extreme_name} and The #{@animal_name} with #{@female_name} in the #{@location}"
Something went wrong with that request. Please try again.