Class: Ppl::Format::Name::FullOnly
- Inherits:
-
Ppl::Format::Name
- Object
- Ppl::Format::Name
- Ppl::Format::Name::FullOnly
- Defined in:
- lib/ppl/format/name/full_only.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 = {}) ⇒ FullOnly
constructor
A new instance of FullOnly.
- #process(name) ⇒ Object
Constructor Details
Instance Attribute Details
#color_adapter=(value) ⇒ Object (writeonly)
Sets the attribute color_adapter
3 4 5 |
# File 'lib/ppl/format/name/full_only.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/name/full_only.rb', line 4 def colors=(value) @colors = value end |
Instance Method Details
#process(name) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ppl/format/name/full_only.rb', line 11 def process(name) output = "" if !name.full.nil? output += name.full end colorize_output(output) end |