class GnomeKeyring::AttributeList

GLib::Array alias used when returning lists of GnomeKeyringAttribute.

Public Class Methods

from(object) click to toggle source
# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 17
def self.from(object)
  case object
  when self then object
  when FFI::Pointer then wrap object
  else new.tap { |arr| arr.append_vals object }
  end
end
new() click to toggle source
# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 8
def self.new
  ptr = GnomeKeyring::Lib.gnome_keyring_attribute_list_new
  wrap(ptr)
end
wrap(ptr) click to toggle source
Calls superclass method
# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 13
def self.wrap(ptr)
  super GnomeKeyring::Attribute, ptr
end

Public Instance Methods

append_string(name, value) click to toggle source
# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 25
def append_string(name, value)
  v2 = GirFFI::InPointer.from(:utf8, name)
  v3 = GirFFI::InPointer.from(:utf8, value)
  GnomeKeyring::Lib.gnome_keyring_attribute_list_append_string self, v2, v3
end
append_uint32(name, value) click to toggle source
# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 31
def append_uint32(name, value)
  v2 = GirFFI::InPointer.from(:utf8, name)
  GnomeKeyring::Lib.gnome_keyring_attribute_list_append_uint32 self, v2, value
end

Private Instance Methods

check_element_size_match() click to toggle source

FIXME: Private method override. Bad.

# File lib/gir_ffi-gnome_keyring/attribute_list.rb, line 39
def check_element_size_match
  true
end