Module: Gio::Resources
- Defined in:
- lib/gio2/resources.rb
Class Method Summary collapse
- .enumerate_children(path, flags = nil) ⇒ Object
- .enumerate_children_raw ⇒ Object
- .get_info(path, flags = nil) ⇒ Object
- .get_info_raw ⇒ Object
- .lookup_data(path, flags = nil) ⇒ Object
- .lookup_data_raw ⇒ Object
- .open_stream(path, flags = nil) ⇒ Object
- .open_stream_raw ⇒ Object
- .register(resource) ⇒ Object
- .unregister(resource) ⇒ Object
Class Method Details
.enumerate_children(path, flags = nil) ⇒ Object
50 51 52 53 |
# File 'lib/gio2/resources.rb', line 50 def enumerate_children(path, flags=nil) flags ||= ResourceLookupFlags::NONE enumerate_children_raw(path, flags) end |
.enumerate_children_raw ⇒ Object
49 |
# File 'lib/gio2/resources.rb', line 49 alias_method :enumerate_children_raw, :enumerate_children |
.get_info(path, flags = nil) ⇒ Object
56 57 58 59 |
# File 'lib/gio2/resources.rb', line 56 def get_info(path, flags=nil) flags ||= ResourceLookupFlags::NONE get_info_raw(path, flags) end |
.get_info_raw ⇒ Object
55 |
# File 'lib/gio2/resources.rb', line 55 alias_method :get_info_raw, :get_info |
.lookup_data(path, flags = nil) ⇒ Object
29 30 31 32 |
# File 'lib/gio2/resources.rb', line 29 def lookup_data(path, flags=nil) flags ||= ResourceLookupFlags::NONE lookup_data_raw(path, flags) end |
.lookup_data_raw ⇒ Object
28 |
# File 'lib/gio2/resources.rb', line 28 alias_method :lookup_data_raw, :lookup_data |
.open_stream(path, flags = nil) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gio2/resources.rb', line 35 def open_stream(path, flags=nil) flags ||= ResourceLookupFlags::NONE input_stream = open_stream_raw(path, flags) if block_given? begin yield(input_stream) ensure input_stream.close end else input_stream end end |
.open_stream_raw ⇒ Object
34 |
# File 'lib/gio2/resources.rb', line 34 alias_method :open_stream_raw, :open_stream |
.register(resource) ⇒ Object
20 21 22 |
# File 'lib/gio2/resources.rb', line 20 def register(resource) resource._register end |
.unregister(resource) ⇒ Object
24 25 26 |
# File 'lib/gio2/resources.rb', line 24 def unregister(resource) resource._unregister end |