Class: Gio::DataInputStream

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/gio2.rb

Instance Method Summary collapse

Instance Method Details

#eachObject Also known as: each_line



19
20
21
22
23
# File 'lib/gio2.rb', line 19

def each
  while line = read_line
    yield line
  end
end

#each_async(io_priority = GLib::PRIORITY_DEFAULT, cancellable = nil, &block) ⇒ Object Also known as: each_line_async



27
28
29
30
# 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