HyakuninIssyu 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/lib/HyakuninIssyu/version.rb +1 -1
- data/spec/hyakuninissyu_spec.rb +4 -4
- 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: 5f4245b17c96084fa90ad6d0cfb7646b07d98e08
|
4
|
+
data.tar.gz: a32b9d40fb472ef130786a39d7e930ae893ce7f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c5b03e49db98323b2693f32d8428e347296377ebcac79ed08015bf4f6c53d07d3b2793734ab77ea0a91fcc4e3b7b9bd961378528fdedf4310aced5e3b77c52b
|
7
|
+
data.tar.gz: 45a5b5c68da766c18576976f7db8e62e57927d8745e138e3fb8100f6eaa18d6abc81d0088019aa0377a125cf53c00a2e97bf37473abe391de1376159e120ca23
|
data/README.md
CHANGED
@@ -37,12 +37,16 @@ To retrieve the poem info,
|
|
37
37
|
|
38
38
|
data.poem.kanji #=> "朝ぼらけ 宇治の川霧 たえだえに あらはれわたる 瀬々の網代木"
|
39
39
|
data.poem.kana #=> "あさぼらけうじのかわぎりたえだえに あらはれわたるせぜのあじろぎ"
|
40
|
+
data.poem.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."
|
41
|
+
|
40
42
|
|
41
43
|
data.poem.first.kanji #=> "朝ぼらけ宇治の川霧たえだえに"
|
42
44
|
data.poem.first.kana #=> "あさぼらけうじのかわぎりたえだえに"
|
45
|
+
data.poem.first.en #=> "In the early dawn When the mists on Uji River Slowly lift and clear,"
|
43
46
|
|
44
47
|
data.poem.last.kanji #=> "あらはれわたる瀬々の網代木"
|
45
48
|
data.poem.last.kana #=> "あらはれわたるせぜのあじろぎ"
|
49
|
+
data.poem.last.en #=> "From the shallows to the deep, The stakes of fishing nets appear."
|
46
50
|
|
47
51
|
data.poem.comment #=> "「朝ぼらけ」は夜明けであたりがほのぼのと明るくなってくる頃..."
|
48
52
|
|
@@ -53,13 +57,16 @@ To retrieve the poem info,
|
|
53
57
|
###Poet Info | 歌人情報の取得
|
54
58
|
To retrieve the poet info for the same poem,
|
55
59
|
|
56
|
-
data.poet.name #=> "権中納言定頼"
|
60
|
+
data.poet.name.ja #=> "権中納言定頼"
|
61
|
+
data.poet.name.en #=> "Fujiwara no Sadayori"
|
57
62
|
data.poet.period #=> "995-1045"
|
58
63
|
data.poet.info #=> "本名は藤原定頼(ふじわらの さだより)。平安時代中期の公家・歌人..."
|
59
|
-
|
64
|
+
|
60
65
|
data.poet.male? #=> true
|
61
66
|
data.poet.female? #=> false
|
62
67
|
data.poet.monk? #=> false
|
68
|
+
data.poet.semimaru? #=> false
|
69
|
+
|
63
70
|
data.poet.list #=> ["天智天皇", "持統天皇", "柿本人麻呂", ... "]
|
64
71
|
|
65
72
|
"list" method returns all the poet names in array.
|
data/spec/hyakuninissyu_spec.rb
CHANGED
@@ -15,17 +15,17 @@ describe HyakuninIssyu do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should return poet" do
|
18
|
-
@test_poem.poet.name.should_not be_nil
|
18
|
+
@test_poem.poet.name.ja.should_not be_nil
|
19
19
|
end
|
20
20
|
|
21
21
|
it "should return correct poem" do
|
22
|
-
correct_poem = @poems[@id-1]["poem"]
|
22
|
+
correct_poem = @poems[@id-1]["poem"]["kanji"]
|
23
23
|
@test_poem.poem.kanji.should eq(correct_poem)
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should return correct poet" do
|
27
|
-
correct_poet = @poets[@id-1]["name"]
|
28
|
-
@test_poem.poet.name.should eq(correct_poet)
|
27
|
+
correct_poet = @poets[@id-1]["name"]["ja"]
|
28
|
+
@test_poem.poet.name.ja.should eq(correct_poet)
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should return first half of poem" do
|