class NerdFlirt::Printer
Public Class Methods
four_breaks()
click to toggle source
# File lib/nerd_flirt/printer.rb, line 41 def self.four_breaks print "\n\n\n\n" end
line()
click to toggle source
# File lib/nerd_flirt/printer.rb, line 5 def self.line terminal_width.times do print '-'.colorize(:light_blue) sleep 0.01 end end
loading_dots()
click to toggle source
# File lib/nerd_flirt/printer.rb, line 45 def self.loading_dots 10.times do |n| print '.' sleep 0.4 end end
tag_line()
click to toggle source
# File lib/nerd_flirt/printer.rb, line 52 def self.tag_line text "$ sudo find love", :white, true end
terminal_width()
click to toggle source
# File lib/nerd_flirt/printer.rb, line 56 def self.terminal_width TermInfo.screen_size[1] end
text(str, color = :white, center = false)
click to toggle source
# File lib/nerd_flirt/printer.rb, line 12 def self.text(str, color = :white, center = false) if center ((terminal_width / 2) - (str.length / 2)).times { print ' '} end str.split.each do |word| word.split("").each do |char| print char.colorize( color ) sleep(0.01) end print " " end end