Class: Picard::ErrorMessageFormatter
- Defined in:
- lib/picard/error_message_formatter.rb
Instance Method Summary collapse
Instance Method Details
#format_message(message, context) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/picard/error_message_formatter.rb', line 3 def , context location = "File: #{context.file}, Line: #{context.lineno}" = "Failed Assertion: #{}" lines = make_same_size(location, ) border = '-' * (lines.first.length + 4) #4 = 2 pipes + 2 spaces "#{border}\n| #{lines[0]} |\n| #{lines[1]} |\n#{border}" end |