Sha256: acc29228f336d1eb4836dbbddda5a03eb105108a4dd48fcbe3d77279a711f0d6

Contents?: true

Size: 316 Bytes

Versions: 5

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true

module Confset
  module Validation
    class Error < StandardError
      def self.format(v_res)
        v_res.errors.group_by(&:path).map do |path, messages|
          "#{' ' * 2}#{path.join('.')}: #{messages.map(&:text).join('; ')}"
        end.join("\n")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
confset-1.1.0 lib/confset/validation/error.rb
confset-1.0.3 lib/confset/validation/error.rb
confset-1.0.2 lib/confset/validation/error.rb
confset-1.0.1 lib/confset/validation/error.rb
confset-1.0.0 lib/confset/validation/error.rb