Module: Ftpd::TranslateExceptions::ClassMethods
- Defined in:
- lib/ftpd/translate_exceptions.rb
Instance Method Summary collapse
-
#translate_exceptions(method_name) ⇒ Object
Cause the named method to translate exceptions.
Instance Method Details
#translate_exceptions(method_name) ⇒ Object
Cause the named method to translate exceptions.
41 42 43 44 45 46 47 48 |
# File 'lib/ftpd/translate_exceptions.rb', line 41 def translate_exceptions(method_name) original_method = instance_method(method_name) define_method method_name do |*args| exception_translator.translate_exceptions do original_method.bind(self).call *args end end end |