Browse Source

centerize from left side

main
pvincent 2 months ago
parent
commit
ae2427dde8
  1. 2
      lib/semantic/ansi_formatter.rb

2
lib/semantic/ansi_formatter.rb

@ -181,8 +181,8 @@ module Semantic
def origin = colorize(centerize(log.name), TEXT_CYAN)
def build_prefix(char) = "#{tags} #{origin}#{colorize(char)}"
def build_terminus = "#{tags} #{origin} #{TERMINUS_STRING} "
def centerize(text) = text.truncate(CENTER_SIZE).center(CENTER_SIZE)
def colorize(text, tint = color) = "#{tint}#{text}#{CLEAR}"
def centerize(text) = text.reverse.truncate(CENTER_SIZE).reverse.center(CENTER_SIZE)
def stackisize(items)
return '' if items.empty?

Loading…
Cancel
Save