123456789_123456789_123456789_123456789_123456789_

Class: Minitest::PrideLOL

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, PrideIO
Instance Chain:
self, PrideIO
Inherits: Minitest::PrideIO
Defined in: lib/minitest/pride_plugin.rb

Overview

If you thought the PrideIO was colorful…

(Inspired by lolcat, but with clean math)

Constant Summary

PrideIO - Inherited

ESC, NND

Class Attribute Summary

PrideIO - Inherited

.pride?

Are we showing our testing pride?

Class Method Summary

PrideIO - Inherited

.pride!

Activate the pride plugin.

Instance Attribute Summary

PrideIO - Inherited

#io

The IO we're going to pipe through.

Instance Method Summary

PrideIO - Inherited

#pride

Color a string.

#print

Wrap print to colorize the output.

Instance Method Details

#pride(string)

Make the string even more colorful. Damnit.

[ GitHub ]

  
# File 'lib/minitest/pride_plugin.rb', line 136

def pride string
  c = @colors[@index % @size]
  @index += 1
  "#{ESC}38;5;#{c}m#{string}#{NND}"
end