Hyakumeizan 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +34 -0
- data/Hyakumeizan.gemspec +29 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/Hyakumeizan.rb +5 -0
- data/lib/Hyakumeizan/data/adatarayama.yml +6 -0
- data/lib/Hyakumeizan/data/ainotake.yml +7 -0
- data/lib/Hyakumeizan/data/aizukomagatake.yml +7 -0
- data/lib/Hyakumeizan/data/akagisan.yml +7 -0
- data/lib/Hyakumeizan/data/akaishidake.yml +7 -0
- data/lib/Hyakumeizan/data/akandake.yml +7 -0
- data/lib/Hyakumeizan/data/amagisan.yml +7 -0
- data/lib/Hyakumeizan/data/amakazariyama.yml +7 -0
- data/lib/Hyakumeizan/data/arashimadake.yml +7 -0
- data/lib/Hyakumeizan/data/asahirenpou.yml +7 -0
- data/lib/Hyakumeizan/data/asamayama.yml +7 -0
- data/lib/Hyakumeizan/data/asozan.yml +7 -0
- data/lib/Hyakumeizan/data/azumayama.yml +7 -0
- data/lib/Hyakumeizan/data/azumayasan.yml +7 -0
- data/lib/Hyakumeizan/data/bandaisan.yml +7 -0
- data/lib/Hyakumeizan/data/chiukaisan.yml +7 -0
- data/lib/Hyakumeizan/data/daibosatsurei.yml +7 -0
- data/lib/Hyakumeizan/data/daisetsuzan.yml +7 -0
- data/lib/Hyakumeizan/data/echigokomagatake.yml +7 -0
- data/lib/Hyakumeizan/data/enasan.yml +7 -0
- data/lib/Hyakumeizan/data/fujisan.yml +7 -0
- data/lib/Hyakumeizan/data/goriudake.yml +7 -0
- data/lib/Hyakumeizan/data/hachimantai.yml +7 -0
- data/lib/Hyakumeizan/data/hakoudasan.yml +7 -0
- data/lib/Hyakumeizan/data/hakusan.yml +7 -0
- data/lib/Hyakumeizan/data/hayachinesan.yml +7 -0
- data/lib/Hyakumeizan/data/hijiridake.yml +7 -0
- data/lib/Hyakumeizan/data/hikiridake.yml +7 -0
- data/lib/Hyakumeizan/data/hiragatake.yml +7 -0
- data/lib/Hyakumeizan/data/hiuchiyama.yml +7 -0
- data/lib/Hyakumeizan/data/hodakadake.yml +7 -0
- data/lib/Hyakumeizan/data/hotakayama.yml +7 -0
- data/lib/Hyakumeizan/data/hououzan.yml +7 -0
- data/lib/Hyakumeizan/data/ibukiyama.yml +7 -0
- data/lib/Hyakumeizan/data/iiderenpou.yml +7 -0
- data/lib/Hyakumeizan/data/ishizuchisan.yml +7 -0
- data/lib/Hyakumeizan/data/iwakisan.yml +7 -0
- data/lib/Hyakumeizan/data/iwatesan.yml +7 -0
- data/lib/Hyakumeizan/data/jiunendake.yml +7 -0
- data/lib/Hyakumeizan/data/kaikomagatake.yml +7 -0
- data/lib/Hyakumeizan/data/kaimondake.yml +7 -0
- data/lib/Hyakumeizan/data/kasagadake.yml +7 -0
- data/lib/Hyakumeizan/data/kashimayarigatake.yml +7 -0
- data/lib/Hyakumeizan/data/kenzan.yml +7 -0
- data/lib/Hyakumeizan/data/kinpusan.yml +7 -0
- data/lib/Hyakumeizan/data/kirigamine.yml +7 -0
- data/lib/Hyakumeizan/data/kirishimayama.yml +7 -0
- data/lib/Hyakumeizan/data/kisokomagatake.yml +7 -0
- data/lib/Hyakumeizan/data/kitadake.yml +7 -0
- data/lib/Hyakumeizan/data/kobushidake.yml +7 -0
- data/lib/Hyakumeizan/data/kougaku.yml +7 -0
- data/lib/Hyakumeizan/data/kouhouyouteizanezofuji.yml +7 -0
- data/lib/Hyakumeizan/data/kousaiyama.yml +7 -0
- data/lib/Hyakumeizan/data/kujiusan.yml +7 -0
- data/lib/Hyakumeizan/data/kumotoriyama.yml +7 -0
- data/lib/Hyakumeizan/data/kurobegoroudake.yml +7 -0
- data/lib/Hyakumeizan/data/kusatsushiranesan.yml +7 -0
- data/lib/Hyakumeizan/data/makihatayama.yml +7 -0
- data/lib/Hyakumeizan/data/miukousan.yml +7 -0
- data/lib/Hyakumeizan/data/miyanouradake.yml +7 -0
- data/lib/Hyakumeizan/data/mizugakiyama.yml +7 -0
- data/lib/Hyakumeizan/data/naebasan.yml +7 -0
- data/lib/Hyakumeizan/data/nantaisan.yml +7 -0
- data/lib/Hyakumeizan/data/nasudake.yml +7 -0
- data/lib/Hyakumeizan/data/nikoushiranesan.yml +7 -0
- data/lib/Hyakumeizan/data/norikuradake.yml +7 -0
- data/lib/Hyakumeizan/data/ontakesan.yml +7 -0
- data/lib/Hyakumeizan/data/oodaiharayama.yml +7 -0
- data/lib/Hyakumeizan/data/oominesan.yml +7 -0
- data/lib/Hyakumeizan/data/ooyama.yml +7 -0
- data/lib/Hyakumeizan/data/poroshiridake.yml +7 -0
- data/lib/Hyakumeizan/data/rausudake.yml +7 -0
- data/lib/Hyakumeizan/data/rishiridake.yml +7 -0
- data/lib/Hyakumeizan/data/riukamisan.yml +7 -0
- data/lib/Hyakumeizan/data/senjiugadake.yml +7 -0
- data/lib/Hyakumeizan/data/shibutsusan.yml +7 -0
- data/lib/Hyakumeizan/data/shiomidake.yml +7 -0
- data/lib/Hyakumeizan/data/shiridakeonnenupuri.yml +7 -0
- data/lib/Hyakumeizan/data/shiroumadake.yml +7 -0
- data/lib/Hyakumeizan/data/sobosan.yml +7 -0
- data/lib/Hyakumeizan/data/suishiudake.yml +7 -0
- data/lib/Hyakumeizan/data/sumeragiumiyama.yml +7 -0
- data/lib/Hyakumeizan/data/tanigawadake.yml +7 -0
- data/lib/Hyakumeizan/data/tanzawa.yml +7 -0
- data/lib/Hyakumeizan/data/tateshinayama.yml +7 -0
- data/lib/Hyakumeizan/data/tateyama.yml +7 -0
- data/lib/Hyakumeizan/data/tokachidake.yml +7 -0
- data/lib/Hyakumeizan/data/tomuraushiyama.yml +7 -0
- data/lib/Hyakumeizan/data/tsukiyama.yml +7 -0
- data/lib/Hyakumeizan/data/tsukubasan.yml +7 -0
- data/lib/Hyakumeizan/data/tsurugidake.yml +7 -0
- data/lib/Hyakumeizan/data/utsukidake.yml +7 -0
- data/lib/Hyakumeizan/data/utsukushigahara.yml +7 -0
- data/lib/Hyakumeizan/data/warusawadake.yml +7 -0
- data/lib/Hyakumeizan/data/washiutake.yml +7 -0
- data/lib/Hyakumeizan/data/yakedake.yml +7 -0
- data/lib/Hyakumeizan/data/yakushidake.yml +7 -0
- data/lib/Hyakumeizan/data/yarigatake.yml +7 -0
- data/lib/Hyakumeizan/data/yatsugatake.yml +7 -0
- data/lib/Hyakumeizan/data/zaouzan.yml +7 -0
- data/lib/Hyakumeizan/list.rb +35 -0
- data/lib/Hyakumeizan/version.rb +3 -0
- metadata +162 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module Hyakumeizan
|
4
|
+
class List
|
5
|
+
class NoMountainDataError < StandardError; end
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def all
|
9
|
+
dir.map { |file| YAML.load_file(file) }
|
10
|
+
end
|
11
|
+
|
12
|
+
def filter_by_prefecture(prefecture)
|
13
|
+
all.select { |mountain| mountain[:prefecture].match(prefecture) }
|
14
|
+
end
|
15
|
+
|
16
|
+
%w[name_ja name_en].each do |name|
|
17
|
+
define_method("find_by_#{name}") do |arg|
|
18
|
+
target_mountain = all.find { |mountain| mountain[:"#{name}"] == arg }
|
19
|
+
return raise_no_mountain_data_error!(arg) if target_mountain.nil?
|
20
|
+
target_mountain
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def dir
|
27
|
+
Dir["./lib/Hyakumeizan/data/*.yml"]
|
28
|
+
end
|
29
|
+
|
30
|
+
def raise_no_mountain_data_error!(name)
|
31
|
+
raise NoMountainDataError.new("Can't find a #{name} in data. Please check your input name is correct name.")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: Hyakumeizan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- willian-s123
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-03-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: '["hyakumeizan(仮)"]'
|
14
|
+
email:
|
15
|
+
- ''
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".gitignore"
|
21
|
+
- ".rspec"
|
22
|
+
- ".travis.yml"
|
23
|
+
- CODE_OF_CONDUCT.md
|
24
|
+
- Gemfile
|
25
|
+
- Gemfile.lock
|
26
|
+
- Hyakumeizan.gemspec
|
27
|
+
- LICENSE.txt
|
28
|
+
- README.md
|
29
|
+
- Rakefile
|
30
|
+
- bin/console
|
31
|
+
- bin/setup
|
32
|
+
- lib/Hyakumeizan.rb
|
33
|
+
- lib/Hyakumeizan/data/adatarayama.yml
|
34
|
+
- lib/Hyakumeizan/data/ainotake.yml
|
35
|
+
- lib/Hyakumeizan/data/aizukomagatake.yml
|
36
|
+
- lib/Hyakumeizan/data/akagisan.yml
|
37
|
+
- lib/Hyakumeizan/data/akaishidake.yml
|
38
|
+
- lib/Hyakumeizan/data/akandake.yml
|
39
|
+
- lib/Hyakumeizan/data/amagisan.yml
|
40
|
+
- lib/Hyakumeizan/data/amakazariyama.yml
|
41
|
+
- lib/Hyakumeizan/data/arashimadake.yml
|
42
|
+
- lib/Hyakumeizan/data/asahirenpou.yml
|
43
|
+
- lib/Hyakumeizan/data/asamayama.yml
|
44
|
+
- lib/Hyakumeizan/data/asozan.yml
|
45
|
+
- lib/Hyakumeizan/data/azumayama.yml
|
46
|
+
- lib/Hyakumeizan/data/azumayasan.yml
|
47
|
+
- lib/Hyakumeizan/data/bandaisan.yml
|
48
|
+
- lib/Hyakumeizan/data/chiukaisan.yml
|
49
|
+
- lib/Hyakumeizan/data/daibosatsurei.yml
|
50
|
+
- lib/Hyakumeizan/data/daisetsuzan.yml
|
51
|
+
- lib/Hyakumeizan/data/echigokomagatake.yml
|
52
|
+
- lib/Hyakumeizan/data/enasan.yml
|
53
|
+
- lib/Hyakumeizan/data/fujisan.yml
|
54
|
+
- lib/Hyakumeizan/data/goriudake.yml
|
55
|
+
- lib/Hyakumeizan/data/hachimantai.yml
|
56
|
+
- lib/Hyakumeizan/data/hakoudasan.yml
|
57
|
+
- lib/Hyakumeizan/data/hakusan.yml
|
58
|
+
- lib/Hyakumeizan/data/hayachinesan.yml
|
59
|
+
- lib/Hyakumeizan/data/hijiridake.yml
|
60
|
+
- lib/Hyakumeizan/data/hikiridake.yml
|
61
|
+
- lib/Hyakumeizan/data/hiragatake.yml
|
62
|
+
- lib/Hyakumeizan/data/hiuchiyama.yml
|
63
|
+
- lib/Hyakumeizan/data/hodakadake.yml
|
64
|
+
- lib/Hyakumeizan/data/hotakayama.yml
|
65
|
+
- lib/Hyakumeizan/data/hououzan.yml
|
66
|
+
- lib/Hyakumeizan/data/ibukiyama.yml
|
67
|
+
- lib/Hyakumeizan/data/iiderenpou.yml
|
68
|
+
- lib/Hyakumeizan/data/ishizuchisan.yml
|
69
|
+
- lib/Hyakumeizan/data/iwakisan.yml
|
70
|
+
- lib/Hyakumeizan/data/iwatesan.yml
|
71
|
+
- lib/Hyakumeizan/data/jiunendake.yml
|
72
|
+
- lib/Hyakumeizan/data/kaikomagatake.yml
|
73
|
+
- lib/Hyakumeizan/data/kaimondake.yml
|
74
|
+
- lib/Hyakumeizan/data/kasagadake.yml
|
75
|
+
- lib/Hyakumeizan/data/kashimayarigatake.yml
|
76
|
+
- lib/Hyakumeizan/data/kenzan.yml
|
77
|
+
- lib/Hyakumeizan/data/kinpusan.yml
|
78
|
+
- lib/Hyakumeizan/data/kirigamine.yml
|
79
|
+
- lib/Hyakumeizan/data/kirishimayama.yml
|
80
|
+
- lib/Hyakumeizan/data/kisokomagatake.yml
|
81
|
+
- lib/Hyakumeizan/data/kitadake.yml
|
82
|
+
- lib/Hyakumeizan/data/kobushidake.yml
|
83
|
+
- lib/Hyakumeizan/data/kougaku.yml
|
84
|
+
- lib/Hyakumeizan/data/kouhouyouteizanezofuji.yml
|
85
|
+
- lib/Hyakumeizan/data/kousaiyama.yml
|
86
|
+
- lib/Hyakumeizan/data/kujiusan.yml
|
87
|
+
- lib/Hyakumeizan/data/kumotoriyama.yml
|
88
|
+
- lib/Hyakumeizan/data/kurobegoroudake.yml
|
89
|
+
- lib/Hyakumeizan/data/kusatsushiranesan.yml
|
90
|
+
- lib/Hyakumeizan/data/makihatayama.yml
|
91
|
+
- lib/Hyakumeizan/data/miukousan.yml
|
92
|
+
- lib/Hyakumeizan/data/miyanouradake.yml
|
93
|
+
- lib/Hyakumeizan/data/mizugakiyama.yml
|
94
|
+
- lib/Hyakumeizan/data/naebasan.yml
|
95
|
+
- lib/Hyakumeizan/data/nantaisan.yml
|
96
|
+
- lib/Hyakumeizan/data/nasudake.yml
|
97
|
+
- lib/Hyakumeizan/data/nikoushiranesan.yml
|
98
|
+
- lib/Hyakumeizan/data/norikuradake.yml
|
99
|
+
- lib/Hyakumeizan/data/ontakesan.yml
|
100
|
+
- lib/Hyakumeizan/data/oodaiharayama.yml
|
101
|
+
- lib/Hyakumeizan/data/oominesan.yml
|
102
|
+
- lib/Hyakumeizan/data/ooyama.yml
|
103
|
+
- lib/Hyakumeizan/data/poroshiridake.yml
|
104
|
+
- lib/Hyakumeizan/data/rausudake.yml
|
105
|
+
- lib/Hyakumeizan/data/rishiridake.yml
|
106
|
+
- lib/Hyakumeizan/data/riukamisan.yml
|
107
|
+
- lib/Hyakumeizan/data/senjiugadake.yml
|
108
|
+
- lib/Hyakumeizan/data/shibutsusan.yml
|
109
|
+
- lib/Hyakumeizan/data/shiomidake.yml
|
110
|
+
- lib/Hyakumeizan/data/shiridakeonnenupuri.yml
|
111
|
+
- lib/Hyakumeizan/data/shiroumadake.yml
|
112
|
+
- lib/Hyakumeizan/data/sobosan.yml
|
113
|
+
- lib/Hyakumeizan/data/suishiudake.yml
|
114
|
+
- lib/Hyakumeizan/data/sumeragiumiyama.yml
|
115
|
+
- lib/Hyakumeizan/data/tanigawadake.yml
|
116
|
+
- lib/Hyakumeizan/data/tanzawa.yml
|
117
|
+
- lib/Hyakumeizan/data/tateshinayama.yml
|
118
|
+
- lib/Hyakumeizan/data/tateyama.yml
|
119
|
+
- lib/Hyakumeizan/data/tokachidake.yml
|
120
|
+
- lib/Hyakumeizan/data/tomuraushiyama.yml
|
121
|
+
- lib/Hyakumeizan/data/tsukiyama.yml
|
122
|
+
- lib/Hyakumeizan/data/tsukubasan.yml
|
123
|
+
- lib/Hyakumeizan/data/tsurugidake.yml
|
124
|
+
- lib/Hyakumeizan/data/utsukidake.yml
|
125
|
+
- lib/Hyakumeizan/data/utsukushigahara.yml
|
126
|
+
- lib/Hyakumeizan/data/warusawadake.yml
|
127
|
+
- lib/Hyakumeizan/data/washiutake.yml
|
128
|
+
- lib/Hyakumeizan/data/yakedake.yml
|
129
|
+
- lib/Hyakumeizan/data/yakushidake.yml
|
130
|
+
- lib/Hyakumeizan/data/yarigatake.yml
|
131
|
+
- lib/Hyakumeizan/data/yatsugatake.yml
|
132
|
+
- lib/Hyakumeizan/data/zaouzan.yml
|
133
|
+
- lib/Hyakumeizan/list.rb
|
134
|
+
- lib/Hyakumeizan/version.rb
|
135
|
+
homepage: https://github.com/willian-s123/Hyakumeizan
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
metadata:
|
139
|
+
allowed_push_host: https://rubygems.org/
|
140
|
+
homepage_uri: https://github.com/willian-s123/Hyakumeizan
|
141
|
+
source_code_uri: https://github.com/willian-s123/Hyakumeizan
|
142
|
+
changelog_uri: https://github.com/willian-s123/Hyakumeizan
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
require_paths:
|
146
|
+
- lib
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 2.3.0
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
requirements: []
|
158
|
+
rubygems_version: 3.1.2
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: '["hyakumeizan(仮)"]'
|
162
|
+
test_files: []
|