japan_municipality 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/japan_municipality/version.rb +1 -1
- data/lib/japan_municipality.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc9fed41c1d50da0eb7956c30e75c3f29744c41cc98125e771eb61df692a810
|
4
|
+
data.tar.gz: 326d2725dd6a20806d16c2830815495f12726b2527c63cd47ff29af6bff539a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71267f3f516e7819ed3637570920b0ca97bed42b1fa86251d55cbeb38467ef95c6f6b3d8797c03e2705a2dbda45e2b1c16c7d6edd8cc13841759163da28634ab
|
7
|
+
data.tar.gz: efff0ca9af35c4d09e326d6448f60fc1dc94378abf796fa7aa5026869ae029c70e1af94407d638884d18ea02d514662103dcbc39442e5098146b4261a244dd52
|
data/CHANGELOG.md
CHANGED
data/lib/japan_municipality.rb
CHANGED
@@ -4,6 +4,10 @@ require "japan_municipality/version"
|
|
4
4
|
require "csv"
|
5
5
|
|
6
6
|
class JapanMunicipality
|
7
|
+
attr_reader :area_code, :prefecture, :subprefecture
|
8
|
+
attr_reader :subprefecture_furigana, :municipality, :municipality_furigana
|
9
|
+
attr_reader :merger_dissolution_date, :has_merger_dissolution_infomation
|
10
|
+
|
7
11
|
def self.all
|
8
12
|
DATA[2..-1].map do |data|
|
9
13
|
new(data)
|
@@ -22,6 +26,7 @@ class JapanMunicipality
|
|
22
26
|
end
|
23
27
|
|
24
28
|
# https://www.e-stat.go.jp/municipalities/cities/areacode
|
25
|
-
|
26
|
-
|
29
|
+
CSV_PATH = File.expand_path("../../data/municipalities.csv", __FILE__)
|
30
|
+
DATA = CSV.read(CSV_PATH).freeze
|
31
|
+
private_constant :CSV_PATH, :DATA
|
27
32
|
end
|