Module: ErrorsToSentences
- Defined in:
- lib/errors_to_sentences.rb,
lib/errors_to_sentences/version.rb
Constant Summary collapse
- VERSION =
"0.1.1"
Instance Method Summary collapse
Instance Method Details
#to_sentences ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/errors_to_sentences.rb', line 5 def to_sentences sentences = [] .each do |attr, msgs| if msgs.size > 1 sentences << generate_sentence(attr, msgs.dup) else sentences += (attr) end end sentences end |