Sha256: 32fdf6ab7bba4b8d289374a05b91be6f6f5dd1019c2ea20c36b84a346a47165f
Contents?: true
Size: 453 Bytes
Versions: 27
Compression:
Stored size: 453 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
27 entries across 27 versions & 1 rubygems