metherd-missing 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/metherd-missing.rb +2 -2
- data/lib/metherd-missing/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/metherd-missing.rb
CHANGED
@@ -3,11 +3,11 @@ require "metherd-missing/levenshtein_distance"
|
|
3
3
|
require "metherd-missing/trie_node"
|
4
4
|
|
5
5
|
module Kernel
|
6
|
-
def method_missing
|
6
|
+
def method_missing(method, *args, &block)
|
7
7
|
possible_method_names = self.methods.map(&:to_s)
|
8
8
|
results = MetherdMissing::LevenshteinDistance.new(possible_method_names).search(method, 1)
|
9
9
|
if results.any?
|
10
|
-
self.send(results.keys.first.to_s)
|
10
|
+
self.send(results.keys.first.to_s, *args, &block)
|
11
11
|
else
|
12
12
|
super
|
13
13
|
end
|