class Minitest::UntzIO
Constants
- ESC
Start an escape sequence
- NND
End the escape sequence
Attributes
io[R]
Public Class Methods
untz!()
click to toggle source
# File lib/minitest/untz_plugin.rb, line 23 def self.untz! @untz = true end
untz?()
click to toggle source
# File lib/minitest/untz_plugin.rb, line 27 def self.untz? @untz ||= false end
Public Instance Methods
print(o)
click to toggle source
# File lib/minitest/untz_plugin.rb, line 49 def print(o) case o when '.', 'S' io.print "#{untz(o)} " when 'E' io.print "#{ESC}41m#{ESC}37m#{o}#{NND} " when 'F' io.print "#{ESC}41m#{ESC}37mSKREE#{NND} " else io.print "#{o} " end end
untz(string)
click to toggle source
# File lib/minitest/untz_plugin.rb, line 75 def untz(string) string = case string when '.' then 'untz' when 'S' then 'wub' else string end c = @colors[@index % @size] @index += 1 "#{ESC}#{c}m#{string}#{NND}" end