module Flckr::Dict
Constants
- DEFAULT_DICT
Public Class Methods
make_ten_words(words)
click to toggle source
# File lib/flckr/dict.rb, line 8 def self.make_ten_words(words) ten_words = words.take(10) count = ten_words.count return ten_words if count == 10 (10 - count).times { ten_words << Dict.random_line } ten_words end
random_line()
click to toggle source
# File lib/flckr/dict.rb, line 4 def self.random_line File.readlines(DEFAULT_DICT).sample.strip end