Class: HyakuninIssyu::Poet

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

Defined Under Namespace

Classes: Name

Constant Summary

Constants inherited from HyakuninIssyu

VERSION

Instance Method Summary collapse

Methods inherited from HyakuninIssyu

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

Returns:

  • (Boolean)


168
169
170
# File 'lib/HyakuninIssyu.rb', line 168

def female?
	@poet['sex'] == 2
end

#idObject



134
135
136
# File 'lib/HyakuninIssyu.rb', line 134

def id
	@poet['id']
end

#infoObject



160
161
162
# File 'lib/HyakuninIssyu.rb', line 160

def info
	@poet['info']
end

#male?Boolean

Returns:

  • (Boolean)


164
165
166
# File 'lib/HyakuninIssyu.rb', line 164

def male?
	@poet['sex'] == 1
end

#monk?Boolean

Returns:

  • (Boolean)


172
173
174
# File 'lib/HyakuninIssyu.rb', line 172

def monk?
	@poet['monk'] == 1
end

#nameObject



138
139
140
# File 'lib/HyakuninIssyu.rb', line 138

def name
	Name.new(@poet)
end

#periodObject



156
157
158
# File 'lib/HyakuninIssyu.rb', line 156

def period
	@poet['period']
end

#semimaru?Boolean

Returns:

  • (Boolean)


176
177
178
# File 'lib/HyakuninIssyu.rb', line 176

def semimaru?
	@poet['id'] == 10
end