Method: Gio::Resources.open_stream
- Defined in:
- lib/gio2/resources.rb
.open_stream(path, flags = nil) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gio2/resources.rb', line 39 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 |