Skip to content

Commit

Permalink
Improve HeaderEnricher#transform
Browse files Browse the repository at this point in the history
  • Loading branch information
robyoung26 committed May 2, 2012
1 parent 99211d3 commit bf42112
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/integrate/handlers/header_enricher.rb
Expand Up @@ -27,15 +27,8 @@ def check_options(options)

def transform(message)
result = message.dup

@headers.each do |header, val|
result[header] =
case result[header]
when nil
val
else
@overwrite ? val : result[header]
end
result[header] = val unless result[header] && !@overwrite
end
result
end
Expand Down

0 comments on commit bf42112

Please sign in to comment.