Sha256: 4c2b984b22078782cb56f51579c40506404c6764648224d29a8964db70b91e2f
Contents?: true
Size: 588 Bytes
Versions: 10
Compression:
Stored size: 588 Bytes
Contents
class Ppl::Format::AddressBook::EmailAddresses < Ppl::Format::AddressBook attr_writer :table def initialize @table = Ppl::Format::Table.new([:id, :email_address]) end def process(address_book) address_book.each { |contact| add_row(contact) } @table.to_s end private def add_row(contact) id = sprintf("%s:", contact.id) email_address = nil if !contact.email_address.nil? email_address = contact.email_address end @table.add_row({ :id => id, :email_address => email_address, }) end end
Version data entries
10 entries across 10 versions & 1 rubygems