Method: Objective::Errors::ErrorMessageCreator#message

Defined in:
lib/objective/errors/error_message_creator.rb

#message(atom, parent_key, index) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/objective/errors/error_message_creator.rb', line 29

def message(atom, parent_key, index)
  [
    index_ordinal(index),
    (atom.key || parent_key || 'item').to_s.titleize,
    MESSAGES[atom.codes]
  ]
    .compact
    .join(' ')
end