postal_codes 0.0.2 → 0.0.3

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- postal_codes (0.0.1)
4
+ postal_codes (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # PostalCodes
2
2
 
3
- TODO: Write a gem description
3
+ A gem to provide details related to postal code(country, state, locality, calling_code, country_code).
4
+
5
+
6
+ Currently it is having data only for India and USA.I will be updating for more countries as well
4
7
 
5
8
  ## Installation
6
9
 
@@ -18,7 +21,17 @@ Or install it yourself as:
18
21
 
19
22
  ## Usage
20
23
 
21
- TODO: Write usage instructions here
24
+ To Find information of postal code :
25
+
26
+ PostalCodes.find_all(110094)
27
+
28
+ It will return the array of Hash:
29
+
30
+ [{"country"=>{"name"=>"India", "calling_code"=>"+91", "alpha_2_code"=>"IN", "alpha_3_code"=>"IND", "numeric_code"=>"356"}, "state"=>"DELHI", "locality"=>"New Delhi"}]
31
+
32
+ In rare case if a postal code present in more than one country then it will display result as follows :
33
+
34
+ [{"country"=>{"name"=>"India", "calling_code"=>"+91", "alpha_2_code"=>"IN", "alpha_3_code"=>"IND", "numeric_code"=>"356"},"state"=>"DELHI", "locality"=>"New Delhi"}, {"country"=>{"name"=>"USA","calling_code"=>"+1","alpha_2_code"=>"US", "alpha_3_code"=>"USA", "numeric_code"=>"840"},"state"=>"Alabama", "locality"=>"Moody"}]
22
35
 
23
36
  ## Contributing
24
37