Class: Pixelflut::Canvas::Buffered
- Inherits:
-
Base
- Object
- Base
- Pixelflut::Canvas::Buffered
show all
- Defined in:
- lib/pixelflut/canvas/buffered.rb
Instance Attribute Summary
Attributes inherited from Base
#offset_x, #offset_y
Instance Method Summary
collapse
Methods inherited from Base
#[]=, #ascii, #color, #initialize, #line, #pix, #rect, #translate
Instance Method Details
#clear! ⇒ Object
8
9
10
|
# File 'lib/pixelflut/canvas/buffered.rb', line 8
def clear!
@lines = []
end
|
#each(&block) ⇒ Object
12
13
14
|
# File 'lib/pixelflut/canvas/buffered.rb', line 12
def each(&block)
block ? @lines.each(&block) : to_enum(__method__)
end
|
#to_s ⇒ Object
16
17
18
|
# File 'lib/pixelflut/canvas/buffered.rb', line 16
def to_s
@lines.join
end
|