HyakuninIssyu 0.7.0 → 0.7.2
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 +14 -4
- data/lib/HyakuninIssyu/version.rb +1 -1
- data/lib/HyakuninIssyu.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e13b1e18f3ca49d7107b26ac598046e45eb6e7e
|
4
|
+
data.tar.gz: 53d0cfa2e603448a41896c5fad13e2ba06bb3bd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b9be2465d28faa7a714786697e3ad1834c13521005c02658063889b2c84ac8303feb5ecebd49b398c4d219011866ed6435f0a72c87ad0dccc44c6b3be3980e5
|
7
|
+
data.tar.gz: 9c632b80cc477a866f59ffdf3f71330b582db5704f4bfe4c959134e370849ed7d4f08bf6c6e7ed6054bb074627c1b7599b161c0117e0166fb4bff5fdd1d25ca1
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ Then use this to retrieve poem and poet data.
|
|
33
33
|
###Poem Info | 歌情報の取得
|
34
34
|
When retrieving the 64th poem (it's one of my favourite), what you can do is:
|
35
35
|
|
36
|
-
|
36
|
+
poem_data = data.poem(64)
|
37
37
|
|
38
38
|
poem_data.kanji #=> "朝ぼらけ 宇治の川霧 たえだえに あらはれわたる 瀬々の網代木"
|
39
39
|
poem_data.kana #=> "あさぼらけうじのかわぎりたえだえに あらはれわたるせぜのあじろぎ"
|
@@ -52,7 +52,7 @@ When retrieving the 64th poem (it's one of my favourite), what you can do is:
|
|
52
52
|
###Poet Info | 歌人情報の取得
|
53
53
|
To retrieve the poet info for the same poem,
|
54
54
|
|
55
|
-
|
55
|
+
poet_data = data.poet(64)
|
56
56
|
|
57
57
|
poet_data.name.ja #=> "権中納言定頼"
|
58
58
|
poet_data.name.en #=> "Fujiwara no Sadayori"
|
@@ -67,9 +67,19 @@ To retrieve the poet info for the same poem,
|
|
67
67
|
###List of poems and poets | データをまとめて扱うとき
|
68
68
|
If you want to list the poems and poets, you can use "poems" and "poets" method to retrieve the raw data of them.
|
69
69
|
|
70
|
-
data.poems
|
71
|
-
|
70
|
+
poems_data = data.poems
|
71
|
+
poems_data[64].kanji #=> "朝ぼらけ 宇治の川霧 たえだえに あらはれわたる 瀬々の網代木"
|
72
|
+
poems_data[64].kana #=> "あさぼらけうじのかわぎりたえだえに あらはれわたるせぜのあじろぎ"
|
73
|
+
poems_data[64].en #=> "In the early dawn When the mists on Uji River Slowly lift and clear, From the shallows to the deep, The stakes of fishing nets appear."
|
74
|
+
...
|
72
75
|
|
76
|
+
poets_data = data.poets
|
77
|
+
poets_data[64].name.ja #=> "権中納言定頼"
|
78
|
+
poets_data[64].name.en #=> "Fujiwara no Sadayori"
|
79
|
+
poets_data[64].period #=> "995-1045"
|
80
|
+
...
|
81
|
+
|
82
|
+
You can use all the method which were shown before, for each content of the poems/poets data.
|
73
83
|
Use these to retrieve many poems and poets at the same time.
|
74
84
|
|
75
85
|
|
data/lib/HyakuninIssyu.rb
CHANGED
@@ -22,11 +22,19 @@ class HyakuninIssyu
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def poems
|
25
|
-
|
25
|
+
poems = Array.new
|
26
|
+
for i in 1..100
|
27
|
+
poems[i] = Poem.new(i)
|
28
|
+
end
|
29
|
+
return poems
|
26
30
|
end
|
27
31
|
|
28
32
|
def poets
|
29
|
-
|
33
|
+
poets = Array.new
|
34
|
+
for i in 1..100
|
35
|
+
poets[i] = Poet.new(i)
|
36
|
+
end
|
37
|
+
return poets
|
30
38
|
end
|
31
39
|
|
32
40
|
class Poem < self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: HyakuninIssyu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tomomichi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|