Class: PVN::Log::MessageFormatter
- Inherits:
-
Formatter
- Object
- ColorFormatter
- Formatter
- PVN::Log::MessageFormatter
- Defined in:
- lib/pvn/log/formatter/message_formatter.rb
Constant Summary
Constants inherited from Formatter
Formatter::COLORS, Formatter::WIDTHS
Instance Attribute Summary
Attributes inherited from Formatter
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(use_colors, msg) ⇒ MessageFormatter
constructor
A new instance of MessageFormatter.
Methods inherited from Formatter
Methods inherited from ColorFormatter
Constructor Details
#initialize(use_colors, msg) ⇒ MessageFormatter
Returns a new instance of MessageFormatter.
10 11 12 13 |
# File 'lib/pvn/log/formatter/message_formatter.rb', line 10 def initialize use_colors, msg super use_colors @msg = msg end |
Instance Method Details
#format ⇒ Object
15 16 17 |
# File 'lib/pvn/log/formatter/message_formatter.rb', line 15 def format use_colors ? @msg.color(:white) : @msg end |