module Gio::RubySeekable
Private Instance Methods
virtual_do_can_seek()
click to toggle source
# File lib/gio2/ruby-seekable.rb, line 25 def virtual_do_can_seek ruby_io.respond_to?(:seek) end
virtual_do_can_truncate()
click to toggle source
# File lib/gio2/ruby-seekable.rb, line 41 def virtual_do_can_truncate ruby_io.respond_to?(:truncate) end
virtual_do_seek(offset, type, cancellable)
click to toggle source
# File lib/gio2/ruby-seekable.rb, line 29 def virtual_do_seek(offset, type, cancellable) case type when GLib::IOChannel::SEEK_CUR ruby_type = IO::SEEK_CUR when GLib::IOChannel::SEEK_SET ruby_type = IO::SEEK_SET when GLib::IOChannel::SEEK_END ruby_type = IO::SEEK_END end ruby_io.seek(offset, ruby_type).zero? end
virtual_do_tell()
click to toggle source
GSeekable methods
# File lib/gio2/ruby-seekable.rb, line 21 def virtual_do_tell ruby_io.tell end
virtual_do_truncate_fn(offset, cancellable)
click to toggle source
# File lib/gio2/ruby-seekable.rb, line 45 def virtual_do_truncate_fn(offset, cancellable) ruby_io.truncate(offset) true end