def filter(conditions)
      filtered_stats = @stats.select do |stat|
        selected = true
        conditions.each do |condition, value|
          selected = false if stat[condition] != value
        end
        selected
      end
      StatsRegistry.new(filtered_stats)
    end
def filter(conditions)
      filtered_stats = @stats.select do |stat|
        selected = true
        conditions.each do |condition, value|
          selected = false if stat[condition] != value
        end
        selected
      end
      StatsRegistry.new(filtered_stats)
    end
Public: Creates a new registry with the filtered stats

 conditions - A hash of conditions
            * primary: Whether the stat is primary or not.
            * priority: The priority of the stat used for render issues.

 Returns a new StatsRegistry with the filtered stats