Sha256: 7e25d2a9b5d9d65cb03f6e3da1d2b09c0dd49bb1b57f34d2a7193c27d04b4c5e

Contents?: true

Size: 329 Bytes

Versions: 11

Compression:

Stored size: 329 Bytes

Contents

module Sunspot
  #TODO document
  class DateFacetRow < FacetRow
    def initialize(pair, gap, facet)
      @gap = gap
      super(pair, facet)
    end

    def value
      @value ||=
        begin
          start_date = @facet.field.cast(@pair[0])
          Range.new(start_date, start_date + @gap)
        end
    end
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
Chrononaut-sunspot-client-0.9.4 lib/sunspot/date_facet_row.rb
UnderpantsGnome-sunspot-0.9.1.1 lib/sunspot/date_facet_row.rb
kuahyeow-sunspot-0.9.7 lib/sunspot/date_facet_row.rb
kuahyeow-sunspot-0.9.8 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.0 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.1 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.2 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.3 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.4 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.5 lib/sunspot/date_facet_row.rb
outoftime-sunspot-0.9.6 lib/sunspot/date_facet_row.rb