Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
image_blur
class Image
attr_accessor :data
def initialize (data)
@data = data
end
def output
@data.each do |sub|
sub.each do |cell|
print cell
end
puts "\n"
end
end
end
image = Image.new([[0,0,0,0,1],
[0,1,0,0,0],
[0,0,0,1,0],
[0,0,0,0,1]])
image.output
@gagaception

This comment has been minimized.

Copy link
Owner Author

@gagaception gagaception commented Sep 18, 2015

after changing initialize method everything works as it should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment