Class: Sunspot::Facet
- Inherits:
-
Object
- Object
- Sunspot::Facet
- Defined in:
- lib/sunspot/facet.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(facet_data) ⇒ Facet
constructor
A new instance of Facet.
- #name ⇒ Object (also: #field_name)
- #rows ⇒ Object
Constructor Details
#initialize(facet_data) ⇒ Facet
Returns a new instance of Facet.
3 4 5 |
# File 'lib/sunspot/facet.rb', line 3 def initialize(facet_data) @facet_data = facet_data end |
Instance Method Details
#name ⇒ Object Also known as: field_name
7 8 9 |
# File 'lib/sunspot/facet.rb', line 7 def name @facet_data.name end |
#rows ⇒ Object
12 13 14 |
# File 'lib/sunspot/facet.rb', line 12 def rows @facet_data.rows { |value, count| FacetRow.new(value, count) } end |