Sha256: 82e7585aba604427cab51e12d790ef674085cab55d3989d7e51727563aad9a68

Contents?: true

Size: 462 Bytes

Versions: 8

Compression:

Stored size: 462 Bytes

Contents

module GLib
  # Extra methods for GLib::Strv. The bulk is defined in `gir_ffi-base/glib/strv.rb`
  class Strv
    def ==(other)
      self.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
      self.wrap GirFFI::InPointer.from_array :utf8, enum
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gir_ffi-0.7.4 lib/ffi-glib/strv.rb
gir_ffi-0.7.3 lib/ffi-glib/strv.rb
gir_ffi-0.7.2 lib/ffi-glib/strv.rb
gir_ffi-0.7.1 lib/ffi-glib/strv.rb
gir_ffi-0.7.0 lib/ffi-glib/strv.rb
gir_ffi-0.6.7 lib/ffi-glib/strv.rb
gir_ffi-0.6.6 lib/ffi-glib/strv.rb
gir_ffi-0.6.5 lib/ffi-glib/strv.rb