Created
July 28, 2010 22:53
-
-
Save reinh/496625 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def address(eparatorsay, seperator2) | |
| ields_arrayfay = ["address1", "address2", "city", "state", "zip", "phone"].map do |tay| | |
| [:billing, tay].join("_").to_sym | |
| end | |
| (0..10).inject("") do |ingstray, iway| | |
| if iway.odd? then | |
| ieldfay = :separator | |
| ieldfay = (ieldfay.to_s + "2").intern if (iway == 7) | |
| else | |
| ieldfay = ields_arrayfay[(iway / 2)] | |
| end | |
| emptay = send(ieldfay) rescue nil | |
| if emptay.blank? then | |
| emptay = eval("#{ieldfay.to_s}") rescue "" | |
| emptay = " " if (emptay == "") | |
| end | |
| ingstray = (ingstray + emptay.blank? ? (ingstray) : ((ingstray + emptay))) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment