Sha256: 3fa15839ce285428f30aa5eb48da5b99acef431aecc4dfca62f15988f4f21318

Contents?: true

Size: 293 Bytes

Versions: 17

Compression:

Stored size: 293 Bytes

Contents

module SequenceServer
  # Keep track of last 100 searches in memory.
  module Search
    TRACK = 100

    class << self
      def <<(file)
        data.shift if data.length >= TRACK
        data << file
      end

      private

      def data
        @data ||= []
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sequenceserver-1.0.14 lib/sequenceserver/search.rb
sequenceserver-1.0.13 lib/sequenceserver/search.rb
sequenceserver-1.0.12 lib/sequenceserver/search.rb
sequenceserver-1.0.11 lib/sequenceserver/search.rb
sequenceserver-1.0.10 lib/sequenceserver/search.rb
sequenceserver-1.0.9 lib/sequenceserver/search.rb
sequenceserver-1.0.8 lib/sequenceserver/search.rb
sequenceserver-1.0.7 lib/sequenceserver/search.rb
sequenceserver-1.0.6 lib/sequenceserver/search.rb
sequenceserver-1.0.5 lib/sequenceserver/search.rb
sequenceserver-1.0.4 lib/sequenceserver/search.rb
sequenceserver-1.0.3 lib/sequenceserver/search.rb
sequenceserver-1.0.2 lib/sequenceserver/search.rb
sequenceserver-1.0.1 lib/sequenceserver/search.rb
sequenceserver-1.0.0 lib/sequenceserver/search.rb
sequenceserver-1.0.0.pre.5 lib/sequenceserver/search.rb
sequenceserver-1.0.0.pre.4 lib/sequenceserver/search.rb