Class: Facet
- Inherits:
-
Struct
- Object
- Struct
- Facet
- Extended by:
- HandleFaceting, ManipulateNode
- Defined in:
- public/app/models/facet.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#key ⇒ Object
Returns the value of attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, key, count) ⇒ Facet
constructor
A new instance of Facet.
Methods included from ManipulateNode
inheritance, process_mixed_content, strip_mixed_content
Methods included from HandleFaceting
fetch_only_facets, get_pretty_facet_value, strip_facets
Constructor Details
#initialize(type, key, count) ⇒ Facet
Returns a new instance of Facet.
5 6 7 8 9 10 |
# File 'public/app/models/facet.rb', line 5 def initialize(type, key, count) self.type = type self.key = key self.count = count self.label = self.class.get_pretty_facet_value(self.type, self.key) end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
1 2 3 |
# File 'public/app/models/facet.rb', line 1 def count @count end |
#key ⇒ Object
Returns the value of attribute key
1 2 3 |
# File 'public/app/models/facet.rb', line 1 def key @key end |
#label ⇒ Object
Returns the value of attribute label
1 2 3 |
# File 'public/app/models/facet.rb', line 1 def label @label end |
#type ⇒ Object
Returns the value of attribute type
1 2 3 |
# File 'public/app/models/facet.rb', line 1 def type @type end |