class Rsvg::Handle
Public Class Methods
new(options={})
click to toggle source
# File lib/rsvg2/handle.rb, line 32 def initialize(options={}) flags = options[:flags] path = options[:path] || options[:file] data = options[:data] if path if flags Gio::File.open(:path => path) do |file| initialize_new_from_gfile_sync(file, flags) end else initialize_new_from_file(path) end elsif data initialize_new_from_data(data) else initialize_raw end end
Also aliased as: initialize_raw
new_from_data(data)
click to toggle source
For backward compatibility
# File lib/rsvg2/handle.rb, line 21 def new_from_data(data) new(:data => data) end
new_from_file(file_name, options={})
click to toggle source
For backward compatibility
# File lib/rsvg2/handle.rb, line 26 def new_from_file(file_name, options={}) new(options.merge(:file => file_name)) end