Class: Dbla::Response::Facets::FacetField
- Inherits:
-
Object
- Object
- Dbla::Response::Facets::FacetField
- Defined in:
- lib/dbla/response/facets.rb
Overview
Borrowed from Blacklight
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
- #sort ⇒ Object
Constructor Details
#initialize(name, items, options = {}) ⇒ FacetField
Returns a new instance of FacetField.
6 7 8 9 |
# File 'lib/dbla/response/facets.rb', line 6 def initialize name, items, = {} @name, @items = name, items @options = end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
5 6 7 |
# File 'lib/dbla/response/facets.rb', line 5 def items @items end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/dbla/response/facets.rb', line 5 def name @name end |
Instance Method Details
#limit ⇒ Object
11 12 13 |
# File 'lib/dbla/response/facets.rb', line 11 def limit @options[:limit] || default_limit end |
#offset ⇒ Object
19 20 21 |
# File 'lib/dbla/response/facets.rb', line 19 def offset @options[:offset] || default_offset end |
#sort ⇒ Object
15 16 17 |
# File 'lib/dbla/response/facets.rb', line 15 def sort @options[:sort] || default_sort end |