Sha256: fa7af83195930fde879994bfac3cf4575bb9f0dce406939cb9f07b9dbfecad01
Contents?: true
Size: 498 Bytes
Versions: 27
Compression:
Stored size: 498 Bytes
Contents
class Ppl::Format::AddressBook::Organizations < Ppl::Format::AddressBook attr_writer :table def initialize(colors={}) @table = Ppl::Format::Table.new([:id, :organizations], 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), :organizations => contact.organizations.join(", "), }) end end
Version data entries
27 entries across 27 versions & 1 rubygems