Class: Scrivito::ObjFacetValue
- Inherits:
-
Object
- Object
- Scrivito::ObjFacetValue
- Defined in:
- app/cms/scrivito/obj_facet_value.rb
Overview
Instances of this class represent the result of a faceted search.
Instance Attribute Summary collapse
-
#count ⇒ Integer
readonly
Total number of Objs available that have this value.
-
#included_objs ⇒ Array<BasicObj>
readonly
The Objs that were included in this search.
-
#name ⇒ String
readonly
The name of this ObjFacetValue, i.e.
Instance Attribute Details
#count ⇒ Integer (readonly)
Total number of Objs available that have this value.
Note that this refers to all Objs, not just the Objs included in this search. Also note that the count is approximate.
30 31 32 |
# File 'app/cms/scrivito/obj_facet_value.rb', line 30 def count @count end |
#included_objs ⇒ Array<BasicObj> (readonly)
The Objs that were included in this search.
If you did not specify include_objs
in your facet options, an empty array is returned. The Objs are ordered by relevance.
40 41 42 |
# File 'app/cms/scrivito/obj_facet_value.rb', line 40 def included_objs @included_objs end |
#name ⇒ String (readonly)
The name of this ObjFacetValue, i.e. the value of the attribute.
Example: If you do faceting using the attribute color
, you might receive an ObjFacetValue
with the name “yellow”, another one with the name “green” and so on.
21 22 23 |
# File 'app/cms/scrivito/obj_facet_value.rb', line 21 def name @name end |