Class: Sunspot::Search::FacetRow
- Inherits:
-
Object
- Object
- Sunspot::Search::FacetRow
- Defined in:
- lib/sunspot/search/facet_row.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#instance ⇒ Object
Return the instance referenced by this facet row.
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, count, facet, selected = nil) ⇒ FacetRow
constructor
:nodoc:.
- #inspect ⇒ Object
Constructor Details
#initialize(value, count, facet, selected = nil) ⇒ FacetRow
:nodoc:
7 8 9 |
# File 'lib/sunspot/search/facet_row.rb', line 7 def initialize(value, count, facet, selected=nil) #:nodoc: @value, @count, @selected, @facet = value, count, facet, selected end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
4 5 6 |
# File 'lib/sunspot/search/facet_row.rb', line 4 def count @count end |
#instance ⇒ Object
Return the instance referenced by this facet row. Only valid for field facets whose fields are defined with the :references key.
15 16 17 18 19 20 |
# File 'lib/sunspot/search/facet_row.rb', line 15 def instance if !defined?(@instance) @facet.populate_instances end @instance end |
#selected ⇒ Object (readonly)
Returns the value of attribute selected.
4 5 6 |
# File 'lib/sunspot/search/facet_row.rb', line 4 def selected @selected end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/sunspot/search/facet_row.rb', line 4 def value @value end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/sunspot/search/facet_row.rb', line 22 def inspect "<Sunspot::Search::FacetRow:#{value.inspect} (#{count})>" end |