class TOTS::Printer::Emoji
Emoji
printer
Constants
- CYLON_SIZE
- GOOD
- WAIT
Public Instance Methods
error(e)
click to toggle source
# File lib/tots/printer/emoji.rb, line 22 def error(e) print '💥 ' end
fail(e)
click to toggle source
# File lib/tots/printer/emoji.rb, line 18 def fail(e) print '😡 ' end
pass()
click to toggle source
# File lib/tots/printer/emoji.rb, line 10 def pass print GOOD[rand(GOOD.size)] + " " end
skip()
click to toggle source
# File lib/tots/printer/emoji.rb, line 14 def skip print '😴 ' end
summary()
click to toggle source
Calls superclass method
TOTS::Printer#summary
# File lib/tots/printer/emoji.rb, line 26 def summary puts "\n\n" if @fails_count == 0 && @errors_count == 0 print paint("😊 Happy! ", GREEN) else print paint("😱 Oh, no... ", RED) end puts paint(super, GREY) end
waiting()
click to toggle source
# File lib/tots/printer/emoji.rb, line 40 def waiting puts "\n\n" i = 0 while true i = 0 if i > (WAIT.size - 1) puts "\u001b[2A\r" + paint('Waiting ', GREY) + WAIT[i] + "\n\n" sleep 0.08 i += 1 end end