word_salad 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/word_salad/core_ext.rb +23 -34
- data/lib/word_salad/dictionary +585 -437
- data/lib/word_salad.rb +2 -4
- metadata +1 -1
data/lib/word_salad.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# This module
|
|
3
|
+
# This module generates random English words
|
|
4
4
|
module WordSalad
|
|
5
5
|
class << self
|
|
6
6
|
# the dictionary as a File object
|
|
@@ -14,9 +14,7 @@ module WordSalad
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# all the words in the dictionary
|
|
17
|
-
def words
|
|
18
|
-
File.readlines(dictionary)
|
|
19
|
-
end
|
|
17
|
+
def words = File.readlines(dictionary, chomp: true)
|
|
20
18
|
|
|
21
19
|
# the number of words in the dictionary
|
|
22
20
|
def size
|