Sha256: c3f770e7adad5d162be8d95f3751713c1a755fac381f24a89b376ba3d2da37f9
Contents?: true
Size: 507 Bytes
Versions: 10
Compression:
Stored size: 507 Bytes
Contents
class Ppl::Format::Name::FullOnly < Ppl::Format::Name attr_writer :color_adapter attr_writer :colors def initialize(colors={}) @colors = colors @color_adapter = Ppl::Adapter::Color::Colored.new end def process(name) output = "" if !name.full.nil? output += name.full end colorize_output(output) end private def colorize_output(string) if @colors["name"] @color_adapter.colorize(string, @colors["name"]) else string end end end
Version data entries
10 entries across 10 versions & 1 rubygems