Class: RankedDocument
- Inherits:
-
Object
- Object
- RankedDocument
- Defined in:
- lib/mongomapper_search/ranked_document.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#rank ⇒ Object
Returns the value of attribute rank.
Instance Method Summary collapse
- #==(other_ranked_doc) ⇒ Object
-
#initialize(document) ⇒ RankedDocument
constructor
A new instance of RankedDocument.
Constructor Details
#initialize(document) ⇒ RankedDocument
Returns a new instance of RankedDocument.
4 5 6 |
# File 'lib/mongomapper_search/ranked_document.rb', line 4 def initialize(document) self.document = document end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
2 3 4 |
# File 'lib/mongomapper_search/ranked_document.rb', line 2 def document @document end |
#rank ⇒ Object
Returns the value of attribute rank.
2 3 4 |
# File 'lib/mongomapper_search/ranked_document.rb', line 2 def rank @rank end |
Instance Method Details
#==(other_ranked_doc) ⇒ Object
8 9 10 |
# File 'lib/mongomapper_search/ranked_document.rb', line 8 def ==(other_ranked_doc) self.document == other_ranked_doc.document end |