Sha256: 0945abe07035eaf38ba2f90abd49820cbf9865a8958363c36143e756e000b475

Contents?: true

Size: 308 Bytes

Versions: 5

Compression:

Stored size: 308 Bytes

Contents

module PyCall
  class Set
    include PyObjectWrapper

    def initialize(pyobj)
      super(pyobj, LibPython.PySet_Type)
    end

    def length
      LibPython.PySet_Size(__pyobj__)
    end

    def include?(obj)
      1 == LibPython.PySet_Contains(__pyobj__, Conversions.from_ruby(obj))
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pycall-0.1.0.alpha.20170307 lib/pycall/set.rb
pycall-0.1.0.alpha.20170302 lib/pycall/set.rb
pycall-0.1.0.alpha.20170226 lib/pycall/set.rb
pycall-0.1.0.alpha.20170224b lib/pycall/set.rb
pycall-0.1.0.alpha.20170224 lib/pycall/set.rb