Class: BlacklightFacetExtras::Range::FacetItem
- Inherits:
-
FacetItem
- Object
- RSolr::Ext::Response::Facets::FacetItem
- FacetItem
- BlacklightFacetExtras::Range::FacetItem
- Defined in:
- lib/blacklight_facet_extras/range.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Attributes inherited from FacetItem
Instance Method Summary collapse
-
#initialize(value, hits, opts = {}) ⇒ FacetItem
constructor
A new instance of FacetItem.
- #value ⇒ Object
Constructor Details
#initialize(value, hits, opts = {}) ⇒ FacetItem
Returns a new instance of FacetItem.
7 8 9 10 11 |
# File 'lib/blacklight_facet_extras/range.rb', line 7 def initialize value, hits, opts = {} super(value, hits, opts = {}) @from = opts[:from] @to = opts[:to] end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/blacklight_facet_extras/range.rb', line 5 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
5 6 7 |
# File 'lib/blacklight_facet_extras/range.rb', line 5 def to @to end |
Instance Method Details
#value ⇒ Object
13 14 15 16 |
# File 'lib/blacklight_facet_extras/range.rb', line 13 def value return"[#{self.from} TO #{self.to}]" if self.from and self.to super end |