Sha256: 1cbcf8757639a631c43d806235f2fa04a50e7db7daa4dc66b41db103f1fdf52d

Contents?: true

Size: 454 Bytes

Versions: 10

Compression:

Stored size: 454 Bytes

Contents

module GLib
  # Extra methods for GLib::Strv. The bulk is defined in `gir_ffi-base/glib/strv.rb`
  class Strv
    def ==(other)
      to_a == other.to_a
    end

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/ffi-glib/strv.rb
gir_ffi-0.9.1 lib/ffi-glib/strv.rb
gir_ffi-0.9.0 lib/ffi-glib/strv.rb
gir_ffi-0.8.6 lib/ffi-glib/strv.rb
gir_ffi-0.8.5 lib/ffi-glib/strv.rb
gir_ffi-0.8.4 lib/ffi-glib/strv.rb
gir_ffi-0.8.3 lib/ffi-glib/strv.rb
gir_ffi-0.8.2 lib/ffi-glib/strv.rb
gir_ffi-0.8.1 lib/ffi-glib/strv.rb
gir_ffi-0.8.0 lib/ffi-glib/strv.rb