Exception: Lutaml::Model::CollectionCountOutOfRangeError

Inherits:
Error
  • Object
show all
Defined in:
lib/lutaml/model/error/collection_count_out_of_range_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(attr_name, value, range) ⇒ CollectionCountOutOfRangeError

Returns a new instance of CollectionCountOutOfRangeError.



4
5
6
7
8
9
10
# File 'lib/lutaml/model/error/collection_count_out_of_range_error.rb', line 4

def initialize(attr_name, value, range)
  @attr_name = attr_name
  @value = value
  @range = range

  super()
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/lutaml/model/error/collection_count_out_of_range_error.rb', line 12

def to_s
  "#{@attr_name} count is #{@value&.size || 0}, must be #{range_to_string}"
end