Method: LHS::Problems::Nested::Base#reached_leaf?

Defined in:
lib/lhs/problems/nested/base.rb

#reached_leaf?(messages) ⇒ Boolean

Identifies if the end of nested errors tree is reached

Returns:

  • (Boolean)


24
25
26
27
# File 'lib/lhs/problems/nested/base.rb', line 24

def reached_leaf?(messages)
  messages.keys.length == 1 &&
    !messages.first[0].match(/\./)
end