Skip to content

Instantly share code, notes, and snippets.

@bstolte
Created August 26, 2015 16:49
Show Gist options
  • Save bstolte/b725fbc1060bc05f37a2 to your computer and use it in GitHub Desktop.
Save bstolte/b725fbc1060bc05f37a2 to your computer and use it in GitHub Desktop.
class Image
attr_accessor :image
def initialize(image)
self.image = image
end
def output_image
self.image.each do |row|
puts row.join(", ")
end
end
end
image = Image.new([
[0, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 0, 1],
[0, 0, 0, 0]
])
image.output_image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment