Skip to content

Instantly share code, notes, and snippets.

@pdbradley
Created November 30, 2016 23:36
Show Gist options
  • Save pdbradley/bbfada7b6522da3cf7dd7e150ba9938a to your computer and use it in GitHub Desktop.
Save pdbradley/bbfada7b6522da3cf7dd7e150ba9938a to your computer and use it in GitHub Desktop.
for conner image blur 1
class Image
def initialize(image)
@image = image
end
def output_image
@image.each do |row|
row.each do |cell|
print cell # always puts a newline
end
puts ""
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
# image = Array[[0, 0, 0, 0],[0, 1, 0, 0],[0, 0, 0, 1],[0, 0, 0, 0]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment