Class: MessageFormatter
- Inherits:
-
Object
- Object
- MessageFormatter
- Defined in:
- lib/xcode_warnings/message_formatter.rb
Overview
Formatter for parsed warnings.
Instance Method Summary collapse
-
#format(item) ⇒ String
Format an item to text for Danger.
Instance Method Details
#format(item) ⇒ String
Format an item to text for Danger.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/xcode_warnings/message_formatter.rb', line 10 def format(item) file = item[:file] line = item[:line] = item[:message] if file.nil? || line.nil? else "**#{file}#L#{line}** #{message}" end end |