Class: Array
Instance Method Summary collapse
- #build_errors ⇒ Object
-
#log_errors(prefix_msg = nil) ⇒ Object
Logs all of these errors, as errors, prefixed with the param (optionally).
Instance Method Details
#build_errors ⇒ Object
12 13 14 15 16 |
# File 'lib/jeweler/utils/core_ext/Array.rb', line 12 def build_errors each do |e| @errors << e end end |
#log_errors(prefix_msg = nil) ⇒ Object
Logs all of these errors, as errors, prefixed with the param (optionally)
3 4 5 6 7 8 9 10 11 |
# File 'lib/jeweler/utils/core_ext/Array.rb', line 3 def log_errors(prefix_msg = nil) each do |e| if prefix_msg.nil? Rails.logger.error e else Rails.logger.error prefix_msg + ': ' + e end end end |