Class: Definition::Types::ErrorRenderers::Leaf

Inherits:
Standard
  • Object
show all
Defined in:
lib/definition/types/error_renderers/leaf.rb

Instance Method Summary collapse

Methods inherited from Standard

#initialize

Constructor Details

This class inherits a constructor from Definition::Types::ErrorRenderers::Standard

Instance Method Details

#translated_error(_namespace = "definition") ⇒ Object



9
10
11
12
13
14
# File 'lib/definition/types/error_renderers/leaf.rb', line 9

def translated_error(_namespace = "definition")
  # When there are no sub errors, proceeding gets us into an infinite loop.
  return i18n_error if conform_error.sub_errors.empty?

  conform_error.leaf_errors.map(&:translated_error).join(", ")
end