class Shellout::Shadowbox
Constants
- MIN_WIDTH
Public Class Methods
new(title)
click to toggle source
# File lib/shellout/shadowbox.rb, line 8 def initialize(title) @title = title end
Public Instance Methods
print(out=$stdout)
click to toggle source
# File lib/shellout/shadowbox.rb, line 12 def print(out=$stdout) length = [@title.length, MIN_WIDTH].max + 2 out.print "" << '┌' << '─' * length << "┐ \n" << '│ ' << @title.center(MIN_WIDTH) << " │▒\n" << '└' << '─' * length << "┘▒\n" << ' ' << '▒' * length << "▒\n" end