Exception: Lutaml::Model::InvalidValueError
- Defined in:
- lib/lutaml/model/error/invalid_value_error.rb
Instance Method Summary collapse
-
#initialize(attr_name, value, allowed_values) ⇒ InvalidValueError
constructor
A new instance of InvalidValueError.
- #to_s ⇒ Object
Constructor Details
#initialize(attr_name, value, allowed_values) ⇒ InvalidValueError
Returns a new instance of InvalidValueError.
4 5 6 7 8 9 10 |
# File 'lib/lutaml/model/error/invalid_value_error.rb', line 4 def initialize(attr_name, value, allowed_values) @attr_name = attr_name @value = value @allowed_values = allowed_values super() end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/lutaml/model/error/invalid_value_error.rb', line 12 def to_s "#{@attr_name} is `#{@value}`, must be one of the " \ "following [#{@allowed_values.join(', ')}]" end |