class Steep::Services::PathAssignment

def self.all

def self.all
  new(index: 0, max_index: 1)
end

def self.index_for(path:, max_index:)

def self.index_for(path:, max_index:)
  Digest::MD5.hexdigest(path).hex % max_index
end

def =~(path)

def =~(path)
  (cache[path] ||= self.class.index_for(path: path.to_s, max_index: max_index)) == index
end

def initialize(index:, max_index:)

def initialize(index:, max_index:)
  @index = index
  @max_index = max_index
  @cache = {}
end