Sha256: d8e97d1ca115337d6eaf533b04d302275a484978ced7bf4a39df2975ee31e9d7
Contents?: true
Size: 452 Bytes
Versions: 5
Compression:
Stored size: 452 Bytes
Contents
class Ppl::Format::AddressBook::Urls < Ppl::Format::AddressBook attr_writer :table def initialize(colors={}) @table = Ppl::Format::Table.new([:id, :urls], colors) end def process(address_book) address_book.contacts.each { |contact| add_row(contact) } @table.to_s end private def add_row(contact) @table.add_row({ :id => sprintf("%s:", contact.id), :urls => contact.urls.join(", "), }) end end
Version data entries
5 entries across 5 versions & 1 rubygems