Skip to content

Instantly share code, notes, and snippets.

@tewk
Created February 17, 2010 17:13
Show Gist options
  • Save tewk/306817 to your computer and use it in GitHub Desktop.
Save tewk/306817 to your computer and use it in GitHub Desktop.
require 'pp'
class Jimmy
def gencolumns
a = []
(0..8).each do |i|
a[i] = []
end
base = 0
(0..8).each do |i|
(0..8).each do |j|
a[i][j] = base + j
end
base += 9
end
pp a
end
end
new = Jimmy.new
new.gencolumns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment