Class: Objective::Errors::ErrorArray
- Inherits:
-
Array
- Object
- Array
- Objective::Errors::ErrorArray
- Defined in:
- lib/objective/errors/error_array.rb
Instance Method Summary collapse
- #codes ⇒ Object
- #message(parent_key = nil, _index = nil) ⇒ Object
- #message_list(parent_key = nil, _index = nil) ⇒ Object
Instance Method Details
#codes ⇒ Object
6 7 8 9 10 11 |
# File 'lib/objective/errors/error_array.rb', line 6 def codes map do |e| next unless e.respond_to?(:codes) e.codes end end |
#message(parent_key = nil, _index = nil) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/objective/errors/error_array.rb', line 13 def (parent_key = nil, _index = nil) each_with_index.map do |e, i| next if e.nil? e.(parent_key, i) end end |
#message_list(parent_key = nil, _index = nil) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/objective/errors/error_array.rb', line 20 def (parent_key = nil, _index = nil) each_with_index.map do |e, i| next if e.nil? e.(parent_key, i) end.flatten.compact end |