Class: Xapian::ExpandTerm

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

Overview

Ruby wrapper for an ExpandTerm, i.e. a Xapian::ESetIterator in C++ Not dangerous, but inconvenient to use from a Ruby programming idiom, so we wrap it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, weight) ⇒ ExpandTerm

Returns a new instance of ExpandTerm.



114
115
116
117
# File 'lib/xapian.rb', line 114

def initialize(name, weight)
  @name = name
  @weight = weight
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



112
113
114
# File 'lib/xapian.rb', line 112

def name
  @name
end

#weightObject

Returns the value of attribute weight.



112
113
114
# File 'lib/xapian.rb', line 112

def weight
  @weight
end

Instance Method Details

#==(other) ⇒ Object

initialize



119
120
121
# File 'lib/xapian.rb', line 119

def ==(other)
  return other.is_a?(Xapian::ExpandTerm) && other.name == @name && other.weight == @weight
end