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
93 94 95 96 97 98 99 100 |
# File 'lib/option_initializer.rb', line 93 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 |