Class: Ppl::Format::AddressBook::EmailAddresses
- Inherits:
-
Ppl::Format::AddressBook
- Object
- Ppl::Format::AddressBook
- Ppl::Format::AddressBook::EmailAddresses
- Defined in:
- lib/ppl/format/address_book/email_addresses.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
writeonly
Sets the attribute table.
Instance Method Summary collapse
-
#initialize(colors = {}) ⇒ EmailAddresses
constructor
A new instance of EmailAddresses.
- #process(address_book) ⇒ Object
Constructor Details
#initialize(colors = {}) ⇒ EmailAddresses
Returns a new instance of EmailAddresses.
6 7 8 |
# File 'lib/ppl/format/address_book/email_addresses.rb', line 6 def initialize(colors={}) @table = Ppl::Format::Table.new([:id, :email_addresses], colors) end |
Instance Attribute Details
#table=(value) ⇒ Object (writeonly)
Sets the attribute table
4 5 6 |
# File 'lib/ppl/format/address_book/email_addresses.rb', line 4 def table=(value) @table = value end |
Instance Method Details
#process(address_book) ⇒ Object
10 11 12 13 |
# File 'lib/ppl/format/address_book/email_addresses.rb', line 10 def process(address_book) address_book.contacts.each { |contact| add_row(contact) } @table.to_s end |