Class: Xapian::Posting

Inherits:
Object
  • Object
show all
Defined in:
lib/xapian.rb

Overview

– Wrapper for the C++ class Xapian::PostingIterator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(docid, doclength, wdf) ⇒ Posting

Returns a new instance of Posting.



212
213
214
215
216
# File 'lib/xapian.rb', line 212

def initialize(docid, doclength, wdf)
  @docid = docid
  @doclength = doclength
  @wdf = wdf
end

Instance Attribute Details

#docidObject

Returns the value of attribute docid.



210
211
212
# File 'lib/xapian.rb', line 210

def docid
  @docid
end

#doclengthObject

Returns the value of attribute doclength.



210
211
212
# File 'lib/xapian.rb', line 210

def doclength
  @doclength
end

#wdfObject

Returns the value of attribute wdf.



210
211
212
# File 'lib/xapian.rb', line 210

def wdf
  @wdf
end

Instance Method Details

#==(other) ⇒ Object



218
219
220
221
# File 'lib/xapian.rb', line 218

def ==(other)
  return other.is_a?(Xapian::Posting) && other.docid == @docid && other.doclength == @doclength &&
    other.wdf == @wdf
end