Module: Misspell

Defined in:
lib/misspell.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/misspell.rb', line 4

def method_missing(name, *args, &block)
  methods.each do |m|
    return self.send(m) if
    Levenshtein.distance(m.to_s, name.to_s) == 1
  end
  super
end