class KanjiMaster::Random
Public Instance Methods
address()
click to toggle source
# File lib/kanji_master/random.rb, line 25 def address Address.new(Address.data[rand(0..499)]) end
chinese_number_character()
click to toggle source
# File lib/kanji_master/random.rb, line 15 def chinese_number_character Constant::KANJI_NUMBER[rand(0..9)] end
Also aliased as: kanji_number, number_kanji
name()
click to toggle source
# File lib/kanji_master/random.rb, line 29 def name Name.new(Name.data[rand(0..499)]) end
person()
click to toggle source
# File lib/kanji_master/random.rb, line 21 def person Person.new(Person.data[rand(0..499)]) end
prefecture()
click to toggle source
# File lib/kanji_master/random.rb, line 11 def prefecture Prefecture.new(Prefecture.data[rand(1..47)]) end
prefecture_hash()
click to toggle source
# File lib/kanji_master/random.rb, line 3 def prefecture_hash Prefecture.data[rand(1..47)] end
prefecture_name()
click to toggle source
# File lib/kanji_master/random.rb, line 7 def prefecture_name Prefecture.data[rand(1..47)][:name] end