Class: GenerateWord

Inherits:
Object
  • Object
show all
Defined in:
lib/generate_word.rb

Class Method Summary collapse

Class Method Details

.nounObject



4
5
6
7
8
# File 'lib/generate_word.rb', line 4

def self.noun
  file = File.read('./assets/noun.json')
  nouns = JSON.parse(file)
  nouns['data'][(Random.rand(993))]
end