Class: Komainu::SearchResults
- Inherits:
-
Object
- Object
- Komainu::SearchResults
- Defined in:
- lib/komainu/search_results.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#suggestion ⇒ Object
Returns the value of attribute suggestion.
Instance Method Summary collapse
-
#initialize ⇒ SearchResults
constructor
A new instance of SearchResults.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ SearchResults
Returns a new instance of SearchResults.
5 6 7 |
# File 'lib/komainu/search_results.rb', line 5 def initialize @items = [] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
3 4 5 |
# File 'lib/komainu/search_results.rb', line 3 def items @items end |
#suggestion ⇒ Object
Returns the value of attribute suggestion.
3 4 5 |
# File 'lib/komainu/search_results.rb', line 3 def suggestion @suggestion end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 |
# File 'lib/komainu/search_results.rb', line 9 def to_s { :suggestion => suggestion, :items => items.map { |item| item.text } }.to_s end |