Class: Search::Simple::SearchResult
- Inherits:
-
Struct
- Object
- Struct
- Search::Simple::SearchResult
- Defined in:
- lib/search/simple/searcher.rb,
lib/search/simple/searcher.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#score ⇒ Object
Returns the value of attribute score.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
enable sort by score.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
26 27 28 |
# File 'lib/search/simple/searcher.rb', line 26 def name @name end |
#score ⇒ Object
Returns the value of attribute score
26 27 28 |
# File 'lib/search/simple/searcher.rb', line 26 def score @score end |
Instance Method Details
#<=>(other) ⇒ Object
enable sort by score
30 31 32 |
# File 'lib/search/simple/searcher.rb', line 30 def <=>(other) self.score <=> other.score end |