Exception: Lutaml::Model::PatternNotMatchedError

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

Instance Method Summary collapse

Constructor Details

#initialize(attr_name, pattern, value) ⇒ PatternNotMatchedError



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

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

  super()
end

Instance Method Details

#to_sObject



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

def to_s
  "#{@attr_name}: \"#{@value}\" does not match #{@pattern.inspect}"
end