Created
July 27, 2010 01:14
-
-
Save scottswezey/491555 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# **Updates** | |
%w{body_labor refinish_labor frame_labor}.each do |rate| | |
%w{mean mathematical_mode lowest highest}.each do |method| | |
@result.send(rate).send(method) | |
end | |
end | |
# **Original** | |
%table | |
%tr | |
%th | |
%th Avg. | |
%th Mode | |
%th Min. | |
%th Max. | |
%tr | |
%th Body Labor | |
%td= pretty_number_to_currency @result.body_labor.mean | |
%td= pretty_number_to_currency @result.body_labor.mathematical_mode | |
%td= pretty_number_to_currency @result.body_labor.lowest | |
%td= pretty_number_to_currency @result.body_labor.highest | |
%tr | |
%th Refinish Labor | |
%td= pretty_number_to_currency @result.refinish_labor.mean | |
%td= pretty_number_to_currency @result.refinish_labor.mathematical_mode | |
%td= pretty_number_to_currency @result.refinish_labor.lowest | |
%td= pretty_number_to_currency @result.refinish_labor.highest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can that also be applied to the middle portion?
@result.SOMETHING.send(method)