Sha256: 72f1cdbf7f5981a59c9e941e279cd171d1ddc4764dc38d45b35557a2e8795e6a

Contents?: true

Size: 740 Bytes

Versions: 1

Compression:

Stored size: 740 Bytes

Contents

module Backend

  class Files < Base

    def initialize bundle_name, category
      super bundle_name, category

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

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

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picky-2.7.0 lib/picky/backend/files.rb