Class: HyakuninIssyu::Poem
- Inherits:
-
HyakuninIssyu
- Object
- HyakuninIssyu
- HyakuninIssyu::Poem
- Defined in:
- lib/HyakuninIssyu.rb
Defined Under Namespace
Constant Summary
Constants inherited from HyakuninIssyu
Instance Method Summary collapse
- #comment ⇒ Object
- #en ⇒ Object
- #first ⇒ Object
- #id ⇒ Object
-
#initialize(id) ⇒ Poem
constructor
A new instance of Poem.
- #inspect ⇒ Object
- #kana ⇒ Object
- #kanji ⇒ Object
- #last ⇒ Object
Methods inherited from HyakuninIssyu
Constructor Details
#initialize(id) ⇒ Poem
Returns a new instance of Poem.
39 40 41 |
# File 'lib/HyakuninIssyu.rb', line 39 def initialize(id) @poem = @@poems[id-1] end |
Instance Method Details
#comment ⇒ Object
71 72 73 |
# File 'lib/HyakuninIssyu.rb', line 71 def comment @poem['comment'] end |
#en ⇒ Object
59 60 61 |
# File 'lib/HyakuninIssyu.rb', line 59 def en @poem["poem"]["en"] end |
#id ⇒ Object
47 48 49 |
# File 'lib/HyakuninIssyu.rb', line 47 def id @poem['id'] end |
#inspect ⇒ Object
43 44 45 |
# File 'lib/HyakuninIssyu.rb', line 43 def inspect self.kanji end |
#kana ⇒ Object
51 52 53 |
# File 'lib/HyakuninIssyu.rb', line 51 def kana @poem["poem"]["kana"] end |
#kanji ⇒ Object
55 56 57 |
# File 'lib/HyakuninIssyu.rb', line 55 def kanji @poem["poem"]["kanji"] end |