class DYI::Formatter::Base
@since 0.0.0
Public Class Methods
new(canvas)
click to toggle source
# File lib/dyi/formatter/base.rb, line 29 def initialize(canvas) @canvas = canvas end
Public Instance Methods
puts(io=$>)
click to toggle source
# File lib/dyi/formatter/base.rb, line 33 def puts(io=$>) raise NotImplementedError end
save(file_name, options={})
click to toggle source
# File lib/dyi/formatter/base.rb, line 42 def save(file_name, options={}) open(file_name, "w") {|io| puts(io)} end
string()
click to toggle source
# File lib/dyi/formatter/base.rb, line 37 def string puts(sio = StringIO.new) sio.string end
write_canvas(canvas, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 46 def write_canvas(canvas, io) raise NotImplementedError end
write_circle(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 54 def write_circle(shape, io) raise NotImplementedError end
write_ellipse(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 58 def write_ellipse(shape, io) raise NotImplementedError end
write_group(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 86 def write_group(shape, io) raise NotImplementedError end
write_image(shape, io)
click to toggle source
@since 1.0.0
# File lib/dyi/formatter/base.rb, line 79 def write_image(shape, io) end
write_line(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 62 def write_line(shape, io) raise NotImplementedError end
write_path(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 74 def write_path(shape, io) raise NotImplementedError end
write_polygon(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 70 def write_polygon(shape, io) raise NotImplementedError end
write_polyline(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 66 def write_polyline(shape, io) raise NotImplementedError end
write_rectangle(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 50 def write_rectangle(shape, io) raise NotImplementedError end
write_text(shape, io)
click to toggle source
# File lib/dyi/formatter/base.rb, line 82 def write_text(shape, io) raise NotImplementedError end