Class: Europeana::Blacklight::Response::Facets::FacetField
- Inherits:
-
Object
- Object
- Europeana::Blacklight::Response::Facets::FacetField
- Defined in:
- lib/europeana/blacklight/response/facets.rb
Overview
represents a facet; which is a field and its values
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, items, options = {}) ⇒ FacetField
constructor
A new instance of FacetField.
- #limit ⇒ Object
- #offset ⇒ Object
-
#prefix ⇒ Object
Expected by Blacklight::Facet#facet_paginator.
- #sort ⇒ Object
Constructor Details
#initialize(name, items, options = {}) ⇒ FacetField
Returns a new instance of FacetField.
39 40 41 42 |
# File 'lib/europeana/blacklight/response/facets.rb', line 39 def initialize(name, items, = {}) @name, @items = name, items = end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
37 38 39 |
# File 'lib/europeana/blacklight/response/facets.rb', line 37 def items @items end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
37 38 39 |
# File 'lib/europeana/blacklight/response/facets.rb', line 37 def name @name end |
Instance Method Details
#limit ⇒ Object
44 45 46 |
# File 'lib/europeana/blacklight/response/facets.rb', line 44 def limit [:limit] || default_limit end |
#offset ⇒ Object
48 49 50 |
# File 'lib/europeana/blacklight/response/facets.rb', line 48 def offset [:offset] || default_offset end |
#prefix ⇒ Object
Expected by Blacklight::Facet#facet_paginator
53 54 |
# File 'lib/europeana/blacklight/response/facets.rb', line 53 def prefix end |
#sort ⇒ Object
56 57 58 59 |
# File 'lib/europeana/blacklight/response/facets.rb', line 56 def sort # Europeana API does not support facet sorting nil end |