class DYI::Formatter::PngFormatter
@since 1.0.0
Public Class Methods
new(*args)
click to toggle source
# File lib/dyi/formatter/svg_formatter.rb, line 812 def initialize(*args) @svg_formatter = SvgFormatter.new(*args) end
Public Instance Methods
save(file_name, options={})
click to toggle source
# File lib/dyi/formatter/svg_formatter.rb, line 796 def save(file_name, options={}) IO.popen("rsvg-convert -f png -o #{file_name}", 'w+b') {|io| io.puts(@svg_formatter.string) } end
string()
click to toggle source
# File lib/dyi/formatter/svg_formatter.rb, line 802 def string results = '' IO.popen("rsvg-convert -f png", 'w+') {|io| io.puts(@svg_formatter.string) io.close_write io.read(nil, results) } results end