Class: Gtk::CssProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/gtk3/css-provider.rb

Instance Method Summary collapse

Instance Method Details

#load(options) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gtk3/css-provider.rb', line 19

def load(options)
  data = options[:data]
  file = options[:file]
  path = options[:path]
  resource_path = options[:resource_path]
  if data
    load_from_data(data)
  elsif file
    load_from_file(file)
  elsif path
    load_from_path(path)
  elsif resource_path
    load_from_resource(resource_path)
  else
    message = "Must specify one of :data, :file, :path or :resource_path"
    raise ArgumentError, "#{message}: #{options.inspect}"
  end
end