3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/v_gen/typical_letter_gen.rb', line 3
def call
table = {
0...816=>"a", 816...965=>"b", 965...1243=>"c",
1243...1668=>"d", 1668...2938=>"e", 2938...3160=>"f",
3160...3361=>"g", 3361...3970=>"h", 3970...4666=>"i",
4666...4681=>"j", 4681...4758=>"k", 4758...5160=>"l",
5160...5400=>"m", 5400...6074=>"n", 6074...6824=>"o",
6824...7016=>"p", 7016...7025=>"q", 7025...7623=>"r",
7623...8255=>"s", 8255...9160=>"t", 9160...9435=>"u",
9435...9532=>"v", 9532...9768=>"w", 9768...9783=>"x",
9783...9980=>"y", 9980...9987=>"z"
}
i = Random.new.rand(0...9987)
table.each do |range, letter|
return letter if range.include? i
end
end
|