Class: HammerCLI::Output::Formatters::ColorFormatter
- Inherits:
-
Object
- Object
- HammerCLI::Output::Formatters::ColorFormatter
- Defined in:
- lib/hammer_cli/output/formatters.rb
Instance Method Summary collapse
- #format(data, field_params = {}) ⇒ Object
-
#initialize(color) ⇒ ColorFormatter
constructor
A new instance of ColorFormatter.
- #tags ⇒ Object
Constructor Details
#initialize(color) ⇒ ColorFormatter
Returns a new instance of ColorFormatter.
68 69 70 |
# File 'lib/hammer_cli/output/formatters.rb', line 68 def initialize(color) @color = color end |
Instance Method Details
#format(data, field_params = {}) ⇒ Object
76 77 78 |
# File 'lib/hammer_cli/output/formatters.rb', line 76 def format(data, field_params={}) c = HighLine.color(data.to_s, @color) end |
#tags ⇒ Object
72 73 74 |
# File 'lib/hammer_cli/output/formatters.rb', line 72 def [:screen, :flat] end |