Module: GLib::ListMethods::ListClassMethods

Defined in:
lib/ffi-glib/list_methods.rb

Instance Method Summary collapse

Instance Method Details

#new(type) ⇒ Object



69
70
71
72
73
74
75
# File 'lib/ffi-glib/list_methods.rb', line 69

def new type
  _real_new.tap do |it|
    struct = self::Struct.new(FFI::Pointer.new(0))
    it.instance_variable_set :@struct, struct
    it.instance_variable_set :@element_type, type
  end
end