Class: Sunspot::NullResult::Group
- Inherits:
-
Struct
- Object
- Struct
- Sunspot::NullResult::Group
- Defined in:
- lib/sunspot/null_result/group.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection
3 4 5 |
# File 'lib/sunspot/null_result/group.rb', line 3 def collection @collection end |
#value ⇒ Object
Returns the value of attribute value
3 4 5 |
# File 'lib/sunspot/null_result/group.rb', line 3 def value @value end |
Instance Method Details
#hits ⇒ Object
9 10 11 |
# File 'lib/sunspot/null_result/group.rb', line 9 def hits collection.map { |item| Hit.new item.id } end |
#solr_docs ⇒ Object
5 6 7 |
# File 'lib/sunspot/null_result/group.rb', line 5 def solr_docs collection.map { |item| "#{item.class.to_s} #{item.id}" } end |