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.



230
231
232
233
234
# File 'lib/xapian.rb', line 230

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

Instance Attribute Details

#docidObject

Returns the value of attribute docid.



228
229
230
# File 'lib/xapian.rb', line 228

def docid
  @docid
end

#doclengthObject

Returns the value of attribute doclength.



228
229
230
# File 'lib/xapian.rb', line 228

def doclength
  @doclength
end

#wdfObject

Returns the value of attribute wdf.



228
229
230
# File 'lib/xapian.rb', line 228

def wdf
  @wdf
end

Instance Method Details

#==(other) ⇒ Object



236
237
238
239
# File 'lib/xapian.rb', line 236

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