codewords_solver 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codewords_solver/dictionary.rb +4 -2
- data/lib/codewords_solver/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4886e4d8eb69c91a00c9c8d9aacab82dc3a6b1957a586e1789a4a3b94b0b92c
|
4
|
+
data.tar.gz: 19c61ba5ff23c5a3a0cc10a9306a5a818ccd24791a2cac3a5ba9c75b6f286568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8647b9cc57b9e004a58141d571a62f3d2a4b4336eac4e3575aea018055ddb52782b8fe3a5534b365591454c78dde4fbe040cc7fce530ccc481088c3ca159c361
|
7
|
+
data.tar.gz: a82e7e300ce1162def0024db9ad268c0036f1c183b81f5928eab080f09e92b0d860ec8df376ccb2c755d7449f5e4f534de58ab5d784f6db36410f8188128d839
|
@@ -5,11 +5,13 @@ class CodewordsSolver
|
|
5
5
|
include ActiveSupport::Inflector
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
@words = import_words_by_filepath(
|
8
|
+
@words = import_words_by_filepath(
|
9
|
+
File.join(__dir__, "..", "..", "word_list.txt")
|
10
|
+
)
|
9
11
|
end
|
10
12
|
|
11
13
|
def find_by_regexp(regexp)
|
12
|
-
|
14
|
+
@words.filter { |w| w.length > 2 and w.match? regexp }
|
13
15
|
end
|
14
16
|
|
15
17
|
private
|