Class: Ppl::Format::AddressBook::Nicknames
- Inherits:
-
Ppl::Format::AddressBook
- Object
- Ppl::Format::AddressBook
- Ppl::Format::AddressBook::Nicknames
- Defined in:
- lib/ppl/format/address_book/nicknames.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
writeonly
Sets the attribute table.
Instance Method Summary collapse
- #disable_colors! ⇒ Object
-
#initialize(colors = {}) ⇒ Nicknames
constructor
A new instance of Nicknames.
- #process(address_book) ⇒ Object
Constructor Details
Instance Attribute Details
#table=(value) ⇒ Object (writeonly)
Sets the attribute table
4 5 6 |
# File 'lib/ppl/format/address_book/nicknames.rb', line 4 def table=(value) @table = value end |
Instance Method Details
#disable_colors! ⇒ Object
15 16 17 |
# File 'lib/ppl/format/address_book/nicknames.rb', line 15 def disable_colors! @table.disable_colors! end |
#process(address_book) ⇒ Object
10 11 12 13 |
# File 'lib/ppl/format/address_book/nicknames.rb', line 10 def process(address_book) address_book.contacts.each { |contact| add_row(contact) } @table.to_s end |