Class: HyakuninIssyu::Poet
Defined Under Namespace
Classes: Name
Constant Summary
VERSION
Instance Method Summary
collapse
img_path, #poem, #poems, #poet, #poets
Constructor Details
#initialize(id) ⇒ Poet
Returns a new instance of Poet.
130
131
132
|
# File 'lib/HyakuninIssyu.rb', line 130
def initialize(id)
@poet = @@poets[id-1]
end
|
Instance Method Details
#female? ⇒ Boolean
168
169
170
|
# File 'lib/HyakuninIssyu.rb', line 168
def female?
@poet['sex'] == 2
end
|
#id ⇒ Object
134
135
136
|
# File 'lib/HyakuninIssyu.rb', line 134
def id
@poet['id']
end
|
#info ⇒ Object
160
161
162
|
# File 'lib/HyakuninIssyu.rb', line 160
def info
@poet['info']
end
|
#male? ⇒ Boolean
164
165
166
|
# File 'lib/HyakuninIssyu.rb', line 164
def male?
@poet['sex'] == 1
end
|
#monk? ⇒ Boolean
172
173
174
|
# File 'lib/HyakuninIssyu.rb', line 172
def monk?
@poet['monk'] == 1
end
|
#name ⇒ Object
138
139
140
|
# File 'lib/HyakuninIssyu.rb', line 138
def name
Name.new(@poet)
end
|
#period ⇒ Object
156
157
158
|
# File 'lib/HyakuninIssyu.rb', line 156
def period
@poet['period']
end
|
#semimaru? ⇒ Boolean
176
177
178
|
# File 'lib/HyakuninIssyu.rb', line 176
def semimaru?
@poet['id'] == 10
end
|