Class: GLib::Strv

Inherits:
GObjectIntrospection::Strv show all
Defined in:
lib/ffi-glib/strv.rb

Overview

Represents a null-terminated array of strings. GLib uses this construction, but does not provide any actual functions for this class.

The implementation is mainly inherited from GObjectIntrospection::Strv.

Constant Summary

Constants inherited from GObjectIntrospection::Strv

GObjectIntrospection::Strv::POINTER_SIZE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from GObjectIntrospection::Strv

#each, #initialize, #to_ptr, wrap

Constructor Details

This class inherits a constructor from GObjectIntrospection::Strv

Class Method Details

.from(it) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/ffi-glib/strv.rb', line 12

def self.from(it)
  case it
  when nil
    nil
  when FFI::Pointer
    wrap it
  when self
    it
  else
    from_enumerable it
  end
end

.from_enumerable(enum) ⇒ Object



25
26
27
# File 'lib/ffi-glib/strv.rb', line 25

def self.from_enumerable(enum)
  wrap GirFFI::InPointer.from_array :utf8, enum
end

Instance Method Details

#==(other) ⇒ Object



8
9
10
# File 'lib/ffi-glib/strv.rb', line 8

def ==(other)
  to_a == other.to_a
end