Closed serv closed 12 years ago
In this instance would you expect #to_region to return an empty array or to return nil?
I think either should be fine. Either one of them would be a better indication that the postal code is not valid.
True. Alternatively it could throw a not found error.
If you use "9888" as the postal code, and do
to_region
on it, you get the entire hash of regions.I don't think this is useful. It would make more sense to return
[]
so that we can check that the the postal code is invalid.