class DataMaps::Converter::Postfix
Adds a postfix to the given data
@since 0.0.1
Public Instance Methods
execute(data)
click to toggle source
The execute method to adds a postfix to the given data
@param [mixed] data
# File lib/data_maps/converter/affixes.rb, line 26 def execute(data) case data when Array then data.map{ |v| "#{v}#{option}" } when Hash then Hash[data.map{ |k,v| [k,"#{v}#{option}"] }] else "#{data}#{option}" end end