# File lib/feed-normalizer.rb, line 32 def self.map_functions!(mapping, src, dest) mapping.each do |dest_function, src_functions| src_functions = [src_functions].flatten # pack into array src_functions.each do |src_function| value = if src.respond_to?(src_function) src.send(src_function) elsif src.respond_to?(:has_key?) src[src_function] end unless value.to_s.empty? append_or_set!(value, dest, dest_function) break end end end end