Class: CanvasBrowser

Inherits:
Browser show all
Defined in:
lib/svg_to_canvas_browser.rb

Instance Attribute Summary

Attributes inherited from Browser

#doc

Instance Method Summary collapse

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