Class: SettingsManager::Errors::InvalidError::ComplexErrorArray
- Inherits:
-
Array
- Object
- Array
- SettingsManager::Errors::InvalidError::ComplexErrorArray
- Defined in:
- lib/settings-manager/errors.rb
Instance Method Summary collapse
Instance Method Details
#<<(obj) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/settings-manager/errors.rb', line 8 def <<(obj) unless obj.is_a?(String) || obj.is_a?(ActiveModel::Errors) raise ArgumentError end super end |
#messages ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/settings-manager/errors.rb', line 16 def = [] self.each do || if .is_a?(String) << elsif .is_a?(ActiveModel::Errors) ..each { |m| << m } end end .uniq end |