class QuartzTorrent::Words
Public Class Methods
new()
click to toggle source
# File lib/quartz_flow/mock_client.rb, line 11 def initialize @words = [] File.open "/usr/share/dict/words", "r" do |file| file.each_line do |l| @words.push l.chomp end end end
Public Instance Methods
randomWord()
click to toggle source
# File lib/quartz_flow/mock_client.rb, line 20 def randomWord @words[rand(@words.size)] end