Sha256: 1a97c213223dedb493875e7badfad31b552c32fe43d49cee4e057f8076cd03dd
Contents?: true
Size: 620 Bytes
Versions: 19
Compression:
Stored size: 620 Bytes
Contents
module Lutaml module Model class CollectionCountOutOfRangeError < Error def initialize(attr_name, value, range) @attr_name = attr_name @value = value @range = range super() end def to_s "#{@attr_name} count is #{@value.size}, must be #{range_to_string}" end private def range_to_string if @range.end.nil? "at least #{@range.begin}" elsif @range.begin == @range.end "exactly #{@range.begin}" else "between #{@range.begin} and #{@range.end}" end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems