Skip to content

Commit

Permalink
Merge pull request #1593 from r00k/master
Browse files Browse the repository at this point in the history
Simplify boolean logic into ternary
  • Loading branch information
tenderlove committed Jun 9, 2011
2 parents 54b0aeb + f878880 commit 9295053
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def delegate(*methods)
raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
end

prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" || ''
prefix = options[:prefix] ? "#{options[:prefix] == true ? to : options[:prefix]}_" : ''

file, line = caller.first.split(':', 2)
line = line.to_i
Expand Down

0 comments on commit 9295053

Please sign in to comment.