Class: HyakuninIssyu::Poem

Inherits:
HyakuninIssyu show all
Defined in:
lib/HyakuninIssyu.rb

Defined Under Namespace

Classes: First, Last

Constant Summary

Constants inherited from HyakuninIssyu

VERSION

Instance Method Summary collapse

Methods inherited from HyakuninIssyu

all, find

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

#commentObject



71
72
73
# File 'lib/HyakuninIssyu.rb', line 71

def comment
	@poem['comment']
end

#enObject



59
60
61
# File 'lib/HyakuninIssyu.rb', line 59

def en
	@poem["poem"]["en"]
end

#firstObject



63
64
65
# File 'lib/HyakuninIssyu.rb', line 63

def first
  First.new(@poem)
end

#idObject



47
48
49
# File 'lib/HyakuninIssyu.rb', line 47

def id
	@poem['id']
end

#inspectObject



43
44
45
# File 'lib/HyakuninIssyu.rb', line 43

def inspect
	self.kanji
end

#kanaObject



51
52
53
# File 'lib/HyakuninIssyu.rb', line 51

def kana
	@poem["poem"]["kana"]
end

#kanjiObject



55
56
57
# File 'lib/HyakuninIssyu.rb', line 55

def kanji
	@poem["poem"]["kanji"]
end

#lastObject



67
68
69
# File 'lib/HyakuninIssyu.rb', line 67

def last
	Last.new(@poem)
end