Class: IRB::Canvas
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(h, w) ⇒ Canvas
constructor
A new instance of Canvas.
- #line(x1, y1, x2, y2) ⇒ Object
Constructor Details
Instance Method Details
#draw ⇒ Object
55 56 57 58 59 |
# File 'lib/irb/easter-egg.rb', line 55 def draw @data.each {|row| row.fill(0) } yield @data.map {|row| row.map {|n| " ',;"[n] }.join }.join("\n") end |