# File lib/gio2.rb, line 19 def each while line = read_line yield line end end
# File lib/gio2.rb, line 27 def each_async(io_priority = GLib::PRIORITY_DEFAULT, cancellable = nil, &block) each_async_loop io_priority, cancellable, block self end
# File lib/gio2.rb, line 36 def each_async_loop(io_priority, cancellable, block) # TODO: Should we really pass in the object? I mean, how often is that # useful? We can always get it with result.source_object as well. read_line_async io_priority, cancellable do |result| if line = read_line_finish(result) block.call line each_async_loop io_priority, cancellable, block end end end