Sha256: e3b2dcef201111ba28ba1acefd1418186848d6c70817399daadc5645bb643da3

Contents?: true

Size: 484 Bytes

Versions: 7

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true
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

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-0.10.2 lib/ffi-glib/strv.rb
gir_ffi-0.10.1 lib/ffi-glib/strv.rb
gir_ffi-0.10.0 lib/ffi-glib/strv.rb
gir_ffi-0.10.0.pre1 lib/ffi-glib/strv.rb
gir_ffi-0.9.5 lib/ffi-glib/strv.rb
gir_ffi-0.9.4 lib/ffi-glib/strv.rb
gir_ffi-0.9.3 lib/ffi-glib/strv.rb