Class: Runaworld::Word
- Inherits:
-
Object
- Object
- Runaworld::Word
- Defined in:
- lib/runaworld/word.rb
Constant Summary collapse
- WORD_JSON =
"#{File.dirname(__FILE__)}/../../config/word.json"
Class Method Summary collapse
Class Method Details
.print_all_word ⇒ Object
10 11 12 13 |
# File 'lib/runaworld/word.rb', line 10 def self.print_all_word words = read_file puts words["word"] end |
.print_random_word ⇒ Object
5 6 7 8 |
# File 'lib/runaworld/word.rb', line 5 def self.print_random_word words = read_file puts words["word"].sample end |