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 |
# File 'lib/objective/errors/error_array.rb', line 6 def codes map { |e| e.try(:codes) } end |
#message(parent_key = nil, _index = nil) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/objective/errors/error_array.rb', line 10 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
17 18 19 20 21 22 |
# File 'lib/objective/errors/error_array.rb', line 17 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 |