Exception: Lutaml::Model::Type::InvalidValueError

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

Instance Method Summary collapse

Constructor Details

#initialize(value, allowed_values) ⇒ InvalidValueError



7
8
9
10
11
12
# File 'lib/lutaml/model/error/type/invalid_value_error.rb', line 7

def initialize(value, allowed_values)
  @value = value
  @allowed_values = allowed_values

  super()
end

Instance Method Details

#to_sObject



14
15
16
17
# File 'lib/lutaml/model/error/type/invalid_value_error.rb', line 14

def to_s
  "`#{@value}` is invalid, must be one of the " \
    "following #{@allowed_values.inspect}"
end