Class: Xapian::Term

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

Overview

– safe Ruby wrapper for the dangerous C++ Xapian::TermIterator class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(term, wdf = nil, termfreq = nil) ⇒ Term

Returns a new instance of Term.



73
74
75
76
77
# File 'lib/xapian.rb', line 73

def initialize(term, wdf=nil, termfreq=nil)
  @term = term
  @wdf = wdf
  @termfreq = termfreq
end

Instance Attribute Details

#termObject

Returns the value of attribute term.



71
72
73
# File 'lib/xapian.rb', line 71

def term
  @term
end

#termfreqObject

Returns the value of attribute termfreq.



71
72
73
# File 'lib/xapian.rb', line 71

def termfreq
  @termfreq
end

#wdfObject

Returns the value of attribute wdf.



71
72
73
# File 'lib/xapian.rb', line 71

def wdf
  @wdf
end

Instance Method Details

#==(other) ⇒ Object



79
80
81
# File 'lib/xapian.rb', line 79

def ==(other)
  return other.is_a?(Xapian::Term) && other.term == @term && other.wdf == @wdf && other.termfreq == @termfreq
end