module Kernel
Public Instance Methods
super_p(*args)
click to toggle source
# File lib/super_p.rb, line 9 def super_p(*args) cols = `tput cols`.to_i puts print SuperP.color puts " " * cols args.each do |i| text = i.inspect padding = if text.size <= cols cols - text.size else cols - text.size % cols end puts text + " " * padding end puts " " * cols print "\e[0m" puts " " * cols args.size == 1 ? args[0] : args rescue print "\e[0m" end
Also aliased as: sp