Module: TPTree::Formatter::FormatterMethods
- Defined in:
- lib/tp_tree/formatter.rb
Instance Method Summary collapse
- #color_for_depth(depth) ⇒ Object
- #colorize(text, color) ⇒ Object
- #format_parameters(parameters) ⇒ Object
- #format_return_value(return_value) ⇒ Object
- #format_timing(duration) ⇒ Object
- #format_value(value) ⇒ Object
- #formatter ⇒ Object
Instance Method Details
#color_for_depth(depth) ⇒ Object
39 40 41 |
# File 'lib/tp_tree/formatter.rb', line 39 def color_for_depth(depth) formatter.color_for_depth(depth) end |
#colorize(text, color) ⇒ Object
19 20 21 |
# File 'lib/tp_tree/formatter.rb', line 19 def colorize(text, color) formatter.colorize(text, color) end |
#format_parameters(parameters) ⇒ Object
27 28 29 |
# File 'lib/tp_tree/formatter.rb', line 27 def format_parameters(parameters) formatter.format_parameters(parameters) end |
#format_return_value(return_value) ⇒ Object
35 36 37 |
# File 'lib/tp_tree/formatter.rb', line 35 def format_return_value(return_value) formatter.format_return_value(return_value) end |
#format_timing(duration) ⇒ Object
23 24 25 |
# File 'lib/tp_tree/formatter.rb', line 23 def format_timing(duration) formatter.format_timing(duration) end |
#format_value(value) ⇒ Object
31 32 33 |
# File 'lib/tp_tree/formatter.rb', line 31 def format_value(value) formatter.format_value(value) end |
#formatter ⇒ Object
15 16 17 |
# File 'lib/tp_tree/formatter.rb', line 15 def formatter @formatter ||= Formatters::AnsiFormatter.new end |