Class: Lutaml::Model::LengthError
- Inherits:
-
RestrictionError
- Object
- Error
- RestrictionError
- Lutaml::Model::LengthError
- Defined in:
- lib/lutaml/model/error/length_error.rb
Instance Method Summary collapse
-
#initialize(attr_name, value, length) ⇒ LengthError
constructor
A new instance of LengthError.
- #to_s ⇒ Object
Constructor Details
#initialize(attr_name, value, length) ⇒ LengthError
Returns a new instance of LengthError.
6 7 8 9 10 11 12 |
# File 'lib/lutaml/model/error/length_error.rb', line 6 def initialize(attr_name, value, length) @attr_name = attr_name @value = value @length = length super() end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/lutaml/model/error/length_error.rb', line 14 def to_s "#{@attr_name} length (#{@value.to_s.length}) must be exactly #{@length}" end |