Class: Sunspot::DateFacetRow
- Defined in:
- lib/sunspot/date_facet_row.rb
Overview
TODO document
Instance Method Summary collapse
-
#initialize(pair, gap, facet) ⇒ DateFacetRow
constructor
A new instance of DateFacetRow.
- #value ⇒ Object
Methods inherited from FacetRow
Constructor Details
#initialize(pair, gap, facet) ⇒ DateFacetRow
Returns a new instance of DateFacetRow.
4 5 6 7 |
# File 'lib/sunspot/date_facet_row.rb', line 4 def initialize(pair, gap, facet) @gap = gap super(pair, facet) end |
Instance Method Details
#value ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/sunspot/date_facet_row.rb', line 9 def value @value ||= begin start_date = @facet.field.cast(@pair[0]) Range.new(start_date, start_date + @gap) end end |