class Ppl::Format::Contact::Nicknames
Attributes
color_adapter[W]
colors[W]
Public Class Methods
new(colors={})
click to toggle source
# File lib/ppl/format/contact/nicknames.rb, line 6 def initialize(colors={}) @colors = colors @color_adapter = Ppl::Adapter::Color::Colored.new end
Public Instance Methods
process(contact)
click to toggle source
# File lib/ppl/format/contact/nicknames.rb, line 11 def process(contact) colorize_output(contact.nicknames.join("\n")) end
Private Instance Methods
colorize_output(string)
click to toggle source
# File lib/ppl/format/contact/nicknames.rb, line 17 def colorize_output(string) if @colors["nicknames"] @color_adapter.colorize(string, @colors["nicknames"]) else string end end