Class: HammerCLI::Output::Formatters::ColorFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/hammer_cli/output/formatters.rb

Instance Method Summary collapse

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

#tagsObject



72
73
74
# File 'lib/hammer_cli/output/formatters.rb', line 72

def tags
  [:screen, :flat]
end