1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
MAPPINGS = {"GBP" => "£", "EUR" => "€", "USD" => "$", "AUD" => "$", "CAD" => "$" } # default to USD if we're passed in nil for some reason @curr=curr || "USD" end MAPPINGS[@curr] || " " end end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
MAPPINGS = {"GBP" => "£", "EUR" => "€", "USD" => "$", "AUD" => "$", "CAD" => "$" } # default to USD if we're passed in nil for some reason @curr=curr || "USD" end MAPPINGS[@curr] || " " end end |