Class: Majo::Formatter::Color
- Inherits:
-
Object
- Object
- Majo::Formatter::Color
- Includes:
- Colorize
- Defined in:
- lib/majo/formatter/color.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(result) ⇒ Color
constructor
A new instance of Color.
Methods included from Colorize
Constructor Details
#initialize(result) ⇒ Color
Returns a new instance of Color.
6 7 8 |
# File 'lib/majo/formatter/color.rb', line 6 def initialize(result) @result = result end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/majo/formatter/color.rb', line 10 def call " Total \#{total_memory} bytes (\#{total_objects} objects)\n\n Memory by file\n \#{bar}\n \#{format_two_columns(memory_by_file)}\n\n Memory by location\n \#{bar}\n \#{format_two_columns(memory_by_location)}\n\n Memory by class\n \#{bar}\n \#{format_two_columns(memory_by_class)}\n\n Objects by file\n \#{bar}\n \#{format_two_columns(objects_by_file)}\n\n Objects by location\n \#{bar}\n \#{format_two_columns(objects_by_location)}\n\n Objects by class\n \#{bar}\n \#{format_two_columns(objects_by_class)}\n RESULT\nend\n" |