Sha256: b59222a16df89ff94ec15c96d752b74cecf94e94d71ec4f6b2d7b7e5ecf1a664
Contents?: true
Size: 585 Bytes
Versions: 6
Compression:
Stored size: 585 Bytes
Contents
# encoding: UTF-8 class Spontaneous::Site module Search extend Spontaneous::Concern def indexer(revision) indexer = S::Search::CompoundIndexer.new(revision, indexes.values) begin yield(indexer) ensure indexer.close end end def indexes @indexes ||= {} end def [](name) indexes[name.to_sym] end def []=(name, index) indexes[name.to_sym] = index end def index(name, &definition) index = S::Search::Index.new(self, name, &definition) self[name] = index end end end
Version data entries
6 entries across 6 versions & 1 rubygems