Exception: Lutaml::Model::InvalidChoiceRangeError
- Defined in:
- lib/lutaml/model/error/invalid_choice_range_error.rb
Instance Method Summary collapse
-
#initialize(min, max) ⇒ InvalidChoiceRangeError
constructor
A new instance of InvalidChoiceRangeError.
- #to_s ⇒ Object
Constructor Details
#initialize(min, max) ⇒ InvalidChoiceRangeError
Returns a new instance of InvalidChoiceRangeError.
4 5 6 7 8 9 |
# File 'lib/lutaml/model/error/invalid_choice_range_error.rb', line 4 def initialize(min, max) @min = min @max = max super() end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/lutaml/model/error/invalid_choice_range_error.rb', line 11 def to_s if @min.negative? "Choice lower bound `#{@min}` must be positive" else "Choice upper bound `#{@max}` must be positive" end end |