area 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/readme.md +7 -0
- metadata +1 -1
data/readme.md
CHANGED
@@ -5,6 +5,7 @@ Hi. This gem allows you to perform the following conversions:
|
|
5
5
|
|
6
6
|
* An area code to a region (state)
|
7
7
|
* A state to an area code
|
8
|
+
* A place to a zip code
|
8
9
|
* A zip code to a place (control granularity with city and state options)
|
9
10
|
* A zipcode to a lat/lon
|
10
11
|
* A zipcode to just a lat
|
@@ -34,6 +35,12 @@ In your gemfile: `gem 'area'`
|
|
34
35
|
"CT".to_area #=> ["203", "860"]
|
35
36
|
```
|
36
37
|
|
38
|
+
#### Convert a place to a zip code
|
39
|
+
```` ruby
|
40
|
+
"long island city, ny".to_zip #=> ["11101", "11109", "11120"]
|
41
|
+
"hastings on hudson".to_zip #=> "10706"
|
42
|
+
```
|
43
|
+
|
37
44
|
#### Convert a zip code to a place
|
38
45
|
```` ruby
|
39
46
|
"11211".to_region #=> "Brooklyn, NY"
|