Module: OptionInitializer::MethodCallShortcut
- Defined in:
- lib/option_initializer.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/option_initializer.rb', line 54 def method_missing sym, *args, &block # 1.8 if @base.instance_methods.map(&:to_sym).include?(sym) new.send sym, *args, &block else raise NoMethodError, "undefined method `#{sym}' for #{self}" end end |