nayyar 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/nayyar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b73ccd19ba2f9ea0124304341c983edb9363ec0
|
|
4
|
+
data.tar.gz: e9c7e00c72547ed8904b1db7d03433e2185e0418
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 475405f6bed972be38687570dc18cfff97354c499de93f33c096010a447aa3cd40478ec5c07ca05ebcdf1a3a1b4eee90f86ba8f1d67e60062829d347d33f30a4
|
|
7
|
+
data.tar.gz: 10476a3b59b57050c366257fdc422fc3819eab5fc1add2305dc9c9b5bd8e9012457bd443dce26aa3919b3093c38dd016aacc0b60c445baa68ba845d9c0d04f54
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Nayyar / နေရာ
|
|
2
2
|
[](https://travis-ci.org/mmhan/nayyar.png)
|
|
3
|
+
[](http://badge.fury.io/rb/nayyar)
|
|
3
4
|
|
|
4
5
|
Nayyar is created with the intent of providing basic access to State/Regions, Districts or Townships of Myanmar, based on standards of Myanmar's country-wide census of 2014.
|
|
5
6
|
|
|
@@ -67,11 +68,13 @@ Use any of the `find_by` or `find_by_**index_name**` with a bang `!` to trigger
|
|
|
67
68
|
### Districts
|
|
68
69
|
|
|
69
70
|
Find all districts using
|
|
71
|
+
|
|
70
72
|
```ruby
|
|
71
73
|
Nayyar::District.all
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
Find districts under a certain state using
|
|
77
|
+
|
|
75
78
|
```ruby
|
|
76
79
|
shan_state = Nayyar::State.find_by_alpha3("SHN")
|
|
77
80
|
# get an array of all districts under Shan state using
|
|
@@ -81,6 +84,7 @@ Nayyar::District.of_state(shan_state)
|
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
Find a district using pcode
|
|
87
|
+
|
|
84
88
|
```ruby
|
|
85
89
|
Nayyar::District.find_by_pcode("MMR001D001")
|
|
86
90
|
# or
|
|
@@ -90,6 +94,7 @@ Nayyar::District.find_by(pcode:"MMR001D001")
|
|
|
90
94
|
```
|
|
91
95
|
|
|
92
96
|
Find the state that a district belongs to using
|
|
97
|
+
|
|
93
98
|
```ruby
|
|
94
99
|
Nayyar::District.find_by(pcode:"MMR001D001").state
|
|
95
100
|
|
|
@@ -101,11 +106,13 @@ Use any of the `find_by` or `find_by_**index_name**` with a bang `!` to trigger
|
|
|
101
106
|
### Townships
|
|
102
107
|
|
|
103
108
|
Find all townships using
|
|
109
|
+
|
|
104
110
|
```ruby
|
|
105
111
|
Nayyar::Townships.all
|
|
106
112
|
```
|
|
107
113
|
|
|
108
114
|
Find townships under a certain state using
|
|
115
|
+
|
|
109
116
|
```ruby
|
|
110
117
|
ygn_east = Nayyar::District.find_by_pcode "MMR013D002"
|
|
111
118
|
# get an array of all districts under Shan state using
|
|
@@ -115,6 +122,7 @@ Nayyar::Township.of_district(ygn_east)
|
|
|
115
122
|
```
|
|
116
123
|
|
|
117
124
|
Find a township using pcode
|
|
125
|
+
|
|
118
126
|
```ruby
|
|
119
127
|
Nayyar::Township.find_by_pcode("MMR013017")
|
|
120
128
|
# or
|
|
@@ -124,6 +132,7 @@ Nayyar::Township.find_by(pcode:"MMR013017")
|
|
|
124
132
|
```
|
|
125
133
|
|
|
126
134
|
Find the district that a township belongs to using
|
|
135
|
+
|
|
127
136
|
```ruby
|
|
128
137
|
Nayyar::Township.find_by(pcode:"MMR013017").township
|
|
129
138
|
|
data/lib/nayyar/version.rb
CHANGED