Class: PrideIO
Overview
Show your testing pride!
Constant Summary collapse
- COLORS =
stolen from /System/Library/Perl/5.10.0/Term/ANSIColor.pm
(31..36).to_a
- CHARS =
["*"]
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
-
#initialize(io) ⇒ PrideIO
constructor
A new instance of PrideIO.
- #method_missing(msg, *args) ⇒ Object
- #print(o) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(msg, *args) ⇒ Object
30 31 32 |
# File 'lib/minitest/pride.rb', line 30 def method_missing msg, *args io.send(msg, *args) end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
7 8 9 |
# File 'lib/minitest/pride.rb', line 7 def io @io end |
Instance Method Details
#print(o) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/minitest/pride.rb', line 19 def print o case o when "." then io.print "\e[#{@colors.next}m#{@chars.next}\e[0m" when "E", "F" then io.print "\e[41m\e[37m#{o}\e[0m" else io.print o end end |