lib/SVG/Graph/Graph.rb in svg-graph-2.2.0.beta vs lib/SVG/Graph/Graph.rb in svg-graph-2.2.0
- old
+ new
@@ -252,9 +252,17 @@
out = ''
f.write(@root, out)
return out
end
+ # Burns the graph to an SVG string and returns it with a text/html mime type to be
+ # displayed in IRuby.
+ #
+ # @return [Array] A 2-dimension array containing the SVg string and a mime-type. This is the format expected by IRuby.
+ def to_iruby
+ ["text/html", burn_svg_only]
+ end
+
# Set the height of the graph box, this is the total height
# of the SVG box created - not the graph it self which auto
# scales to fix the space.
attr_accessor :height