Class: HammerCLI::Output::Formatters::KeyValueFormatter
- Inherits:
-
FieldFormatter
- Object
- FieldFormatter
- HammerCLI::Output::Formatters::KeyValueFormatter
- Defined in:
- lib/hammer_cli/output/formatters.rb
Instance Method Summary collapse
Methods inherited from FieldFormatter
Instance Method Details
#format(params, field_params = {}) ⇒ Object
118 119 120 121 122 123 124 125 126 |
# File 'lib/hammer_cli/output/formatters.rb', line 118 def format(params, field_params={}) if params.is_a? Hash name = params[:name] || params["name"] value = params[:value] || params["value"] "#{name} => #{value}" else "" end end |
#tags ⇒ Object
114 115 116 |
# File 'lib/hammer_cli/output/formatters.rb', line 114 def [:screen, :flat] end |