Sha256: 614858ff76ae448ab1f25540d7821b968ef0a89476365bb9afc57e55674171dd
Contents?: true
Size: 637 Bytes
Versions: 15
Compression:
Stored size: 637 Bytes
Contents
module LocalPac module Actions class PrintTitle private attr_reader :title, :width public def initialize(title, width = 0) @title = title @width = width end def run puts long_line puts full_title puts long_line print "\n" end private def long_line '#' * full_title.size end def full_title header + ' ' + title + ' ' + header end def header if width > title.size '#' * ((width - title.size) / 2) else '#' end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems