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
5 6 7 |
# File 'lib/objective/errors/error_array.rb', line 5 def codes map { |e| e&.codes } end |
#message(parent_key = nil, _index = nil) ⇒ Object
9 10 11 |
# File 'lib/objective/errors/error_array.rb', line 9 def (parent_key = nil, _index = nil) each_with_index.map { |e, i| e&.(parent_key, i) } end |
#message_list(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.flatten.compact end |