Sha256: 751932320e3d1d553a4b02ffbc9f62fd9a2d965537d5687bf393ba2c3c22ba56
Contents?: true
Size: 434 Bytes
Versions: 5
Compression:
Stored size: 434 Bytes
Contents
class Ppl::Format::AddressBook::Urls < Ppl::Format::AddressBook attr_writer :table def initialize @table = Ppl::Format::Table.new([:id, :urls]) 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