Class: Hobix::Search::Simple::SearchResult
- Inherits:
-
Struct
- Object
- Struct
- Hobix::Search::Simple::SearchResult
- Defined in:
- lib/hobix/search/simple.rb,
lib/hobix/search/simple.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
28 29 30 |
# File 'lib/hobix/search/simple.rb', line 28 def name @name end |
#score ⇒ Object
Returns the value of attribute score
28 29 30 |
# File 'lib/hobix/search/simple.rb', line 28 def score @score end |
Instance Method Details
#<=>(other) ⇒ Object
enable sort by score
32 33 34 |
# File 'lib/hobix/search/simple.rb', line 32 def <=>(other) self.score <=> other.score end |