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.



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

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

Instance Attribute Details

#termObject

Returns the value of attribute term.



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

def term
  @term
end

#termfreqObject

Returns the value of attribute termfreq.



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

def termfreq
  @termfreq
end

#wdfObject

Returns the value of attribute wdf.



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

def wdf
  @wdf
end

Instance Method Details

#==(other) ⇒ Object



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

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