Sha256: 6b69cffc646cc9abe803ef1d1bd4aa7042bb5487914204a19b7de655bb3f00da
Contents?: true
Size: 518 Bytes
Versions: 17
Compression:
Stored size: 518 Bytes
Contents
class Ppl::Format::Contact::Name < Ppl::Format::Contact attr_writer :color_adapter attr_writer :colors def initialize(colors={}) @colors = colors @color_adapter = Ppl::Adapter::Color::Colored.new end def process(contact) output = "" if !contact.name.nil? output += contact.name 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
17 entries across 17 versions & 1 rubygems