Class: HammerCLI::Output::Formatters::KeyValueFormatter
Instance Method Summary
collapse
inherited, #match?, #tags
Instance Method Details
141
142
143
144
145
146
147
148
149
|
# File 'lib/hammer_cli/output/formatters.rb', line 141
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
|
#required_features ⇒ Object
135
136
137
138
139
|
# File 'lib/hammer_cli/output/formatters.rb', line 135
def required_features
return %i[rich_text serialized] if tags.empty?
tags.map { |t| HammerCLI::Output::Utils.tag_to_feature(t) }
end
|