class GLib::List

Overrides for GList, GLib's doubly linked list implementation.

Public Class Methods

from_enumerable(type, arr) click to toggle source
# File lib/ffi-glib/list.rb, line 10
def self.from_enumerable(type, arr)
  arr.reduce(new type) { |lst, val| lst.append val }
end

Public Instance Methods

append(data) click to toggle source
# File lib/ffi-glib/list.rb, line 14
def append(data)
  self.class.wrap(element_type,
                  Lib.g_list_append(self, element_ptr_for(data)))
end