Class: KanjiMaster::Random
- Inherits:
-
Object
- Object
- KanjiMaster::Random
- Defined in:
- lib/kanji_master/random.rb
Instance Method Summary collapse
- #address ⇒ Object
- #chinese_number_character ⇒ Object (also: #kanji_number, #number_kanji)
- #name ⇒ Object
- #person ⇒ Object
- #prefecture ⇒ Object
- #prefecture_hash ⇒ Object
- #prefecture_name ⇒ Object
Instance Method Details
#address ⇒ Object
25 26 27 |
# File 'lib/kanji_master/random.rb', line 25 def address Address.new(Address.data[rand(0..499)]) end |
#chinese_number_character ⇒ Object Also known as: kanji_number, number_kanji
15 16 17 |
# File 'lib/kanji_master/random.rb', line 15 def chinese_number_character Constant::KANJI_NUMBER[rand(0..9)] end |
#name ⇒ Object
29 30 31 |
# File 'lib/kanji_master/random.rb', line 29 def name Name.new(Name.data[rand(0..499)]) end |
#person ⇒ Object
21 22 23 |
# File 'lib/kanji_master/random.rb', line 21 def person Person.new(Person.data[rand(0..499)]) end |
#prefecture ⇒ Object
11 12 13 |
# File 'lib/kanji_master/random.rb', line 11 def prefecture Prefecture.new(Prefecture.data[rand(1..47)]) end |
#prefecture_hash ⇒ Object
3 4 5 |
# File 'lib/kanji_master/random.rb', line 3 def prefecture_hash Prefecture.data[rand(1..47)] end |
#prefecture_name ⇒ Object
7 8 9 |
# File 'lib/kanji_master/random.rb', line 7 def prefecture_name Prefecture.data[rand(1..47)][:name] end |