Class: Typesensual::Search::Facet
- Inherits:
-
Object
- Object
- Typesensual::Search::Facet
- Defined in:
- lib/typesensual/search/facet.rb
Overview
Represents a facet returned with search results
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #count ⇒ Object
- #highlighted ⇒ Object
-
#initialize(key, facet) ⇒ Facet
constructor
A new instance of Facet.
- #value ⇒ Object
Constructor Details
#initialize(key, facet) ⇒ Facet
Returns a new instance of Facet.
9 10 11 12 |
# File 'lib/typesensual/search/facet.rb', line 9 def initialize(key, facet) @key = key @facet = facet end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
7 8 9 |
# File 'lib/typesensual/search/facet.rb', line 7 def key @key end |
Instance Method Details
#count ⇒ Object
14 15 16 |
# File 'lib/typesensual/search/facet.rb', line 14 def count @facet['count'] end |
#highlighted ⇒ Object
22 23 24 |
# File 'lib/typesensual/search/facet.rb', line 22 def highlighted @facet['highlighted'] end |
#value ⇒ Object
18 19 20 |
# File 'lib/typesensual/search/facet.rb', line 18 def value @facet['value'] end |