Class: CanvasBrowser
Instance Attribute Summary
Attributes inherited from Browser
Instance Method Summary collapse
-
#initialize(o = {}) ⇒ CanvasBrowser
constructor
A new instance of CanvasBrowser.
- #load_page(svg_file_name) ⇒ Object
Constructor Details
#initialize(o = {}) ⇒ CanvasBrowser
Returns a new instance of CanvasBrowser.
6 7 8 |
# File 'lib/svg_to_canvas_browser.rb', line 6 def initialize(o={}) super(o) {|env| env.load_renderer CanvasShape::Shape.new} end |
Instance Method Details
#load_page(svg_file_name) ⇒ Object
10 11 12 13 14 |
# File 'lib/svg_to_canvas_browser.rb', line 10 def load_page(svg_file_name) super(svg_file_name) do |doc| yield(doc) end end |