Sha256: 0aa6388db8583079d5229906696f1fbf561c89126302c4a81884f822937fd63e
Contents?: true
Size: 424 Bytes
Versions: 8
Compression:
Stored size: 424 Bytes
Contents
require 'ffi-glib/list_methods' GLib.load_class :List module GLib # Overrides for GList, GLib's doubly linked list implementation. class List include ListMethods def self.from_enumerable(type, arr) arr.reduce(new type) { |lst, val| lst.append val } end def append(data) self.class.wrap(element_type, Lib.g_list_append(self, element_ptr_for(data))) end end end
Version data entries
8 entries across 8 versions & 1 rubygems