Class: Xapian::ExpandTerm
- Inherits:
-
Object
- Object
- Xapian::ExpandTerm
- 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
-
#name ⇒ Object
Returns the value of attribute name.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
-
#==(other) ⇒ Object
initialize.
-
#initialize(name, weight) ⇒ ExpandTerm
constructor
A new instance of ExpandTerm.
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
#name ⇒ Object
Returns the value of attribute name.
112 113 114 |
# File 'lib/xapian.rb', line 112 def name @name end |
#weight ⇒ Object
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 |