Class: Ppl::Format::Contact::Organization
- Inherits:
-
Ppl::Format::Contact
- Object
- Ppl::Format::Contact
- Ppl::Format::Contact::Organization
- Defined in:
- lib/ppl/format/contact/organization.rb
Instance Attribute Summary collapse
-
#color_adapter ⇒ Object
writeonly
Sets the attribute color_adapter.
-
#colors ⇒ Object
writeonly
Sets the attribute colors.
Instance Method Summary collapse
-
#initialize(colors = {}) ⇒ Organization
constructor
A new instance of Organization.
- #process(contact) ⇒ Object
Constructor Details
#initialize(colors = {}) ⇒ Organization
Returns a new instance of Organization.
6 7 8 9 |
# File 'lib/ppl/format/contact/organization.rb', line 6 def initialize(colors={}) @colors = colors @color_adapter = Ppl::Adapter::Color::Colored.new end |
Instance Attribute Details
#color_adapter=(value) ⇒ Object (writeonly)
Sets the attribute color_adapter
3 4 5 |
# File 'lib/ppl/format/contact/organization.rb', line 3 def color_adapter=(value) @color_adapter = value end |
#colors=(value) ⇒ Object (writeonly)
Sets the attribute colors
4 5 6 |
# File 'lib/ppl/format/contact/organization.rb', line 4 def colors=(value) @colors = value end |
Instance Method Details
#process(contact) ⇒ Object
11 12 13 |
# File 'lib/ppl/format/contact/organization.rb', line 11 def process(contact) colorize_output(contact.organizations.join("\n")) end |