Module: Tolerance::HookMethods
- Defined in:
- lib/tolerance/hook_methods.rb
Overview
:nodoc:
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
9 10 11 12 13 14 15 16 |
# File 'lib/tolerance/hook_methods.rb', line 9 def method_missing(name, *args, &block) fex = FakeException.new(name: name, receiver: self) corrections = ::DidYouMean::VariableNameChecker.new(fex).corrections !corrections.empty? ? send(corrections[0], *args, &block) : super rescue ArgumentError super end |