Sha256: c1b7aac89bacb1b60e6fdf39aa199607a5e0ca7e1021c6e561e28cb47247e995

Contents?: true

Size: 694 Bytes

Versions: 7

Compression:

Stored size: 694 Bytes

Contents

module Picky

  module Backend

    class Files < Base

      def initialize bundle
        super bundle

        # Note: We marshal the similarity, as the
        #       Yajl json lib cannot load symbolized
        #       values, just keys.
        #
        @inverted      = File::JSON.new    bundle.index_path(:inverted)
        @weights       = File::JSON.new    bundle.index_path(:weights)
        @similarity    = File::Marshal.new bundle.index_path(:similarity)
        @configuration = File::JSON.new    bundle.index_path(:configuration)
      end

      def to_s
        "#{self.class}(#{[@inverted, @weights, @similarity, @configuration].join(', ')})"
      end

    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
picky-3.0.1 lib/picky/backend/files.rb
picky-3.0.0 lib/picky/backend/files.rb
picky-3.0.0.pre5 lib/picky/backend/files.rb
picky-3.0.0.pre4 lib/picky/backend/files.rb
picky-3.0.0.pre3 lib/picky/backend/files.rb
picky-3.0.0.pre2 lib/picky/backend/files.rb
picky-3.0.0.pre1 lib/picky/backend/files.rb