class Xapian::Mset

Included Modules

Defined in:

xapian/mset.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(mset : LibXapian::Mset) #

[View source]

Instance Method Detail

def each #
Description copied from module Iterable({UInt32, Xapian::Document})

Must return an Iterator over the elements in this collection.


[View source]
def each(& : Tuple(Document::Id, Document) -> ) : Nil #
Description copied from module Enumerable({UInt32, Xapian::Document})

Must yield this collection's elements to the block.


[View source]
def empty? #
Description copied from module Enumerable({UInt32, Xapian::Document})

Returns true if self does not contain any element.

([] of Int32).empty? # => true
([1]).empty?         # => false
[nil, false].empty?  # => false
  • #present? returns the inverse.

[View source]
def map(&block : Document::Id, Document -> {UInt32, Xapian::Document}) forall T #
Description copied from module Enumerable({UInt32, Xapian::Document})

Returns an Array with the results of running the block against each element of the collection.

[1, 2, 3].map { |i| i * 10 } # => [10, 20, 30]

[View source]
def size #
Description copied from module Enumerable({UInt32, Xapian::Document})

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

[View source]
def to_unsafe : LibXapian::Mset #

[View source]