| Module | NyanCat::Common |
| In: |
lib/nyan_cat_formatter/common.rb
|
| ESC | = | "\e[" |
| NND | = | "#{ESC}0m" |
| PASS | = | '=' |
| PASS_ARY | = | ['-', '_'] |
| FAIL | = | '*' |
| ERROR | = | '!' |
| PENDING | = | '+' |
| VT100_CODES | = | { :black => 30, :red => 31, :green => 32, :yellow => 33, :blue => 34, :magenta => 35, :cyan => 36, :white => 37, :bold => 1, } |
| VT100_CODE_VALUES | = | VT100_CODES.invert |
Ascii version of Nyan cat. Two cats in the array allow Nyan to animate running.
@param o [String] Nyan‘s eye @return [Array] Nyan cats
Determines if the any specs failed or are in pending state
@returns [Boolean] true if failed or pending; false otherwise
Determines how to color the example. If pass, it is rainbowified, otherwise we assign red if failed or yellow if an error occurred.
@return [String]
Determine which Ascii Nyan Cat to display. If tests are complete, Nyan Cat goes to sleep. If there are failing or pending examples, Nyan Cat is concerned.
@return [String] Nyan Cat
Colorizes the string with raindow colors of the rainbow
@params string [String] @return [String]