Module: Mumukit::RuntimeShortcuts
- Included in:
- Runtime
- Defined in:
- lib/mumukit/runtime/shortcuts.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/mumukit/runtime/shortcuts.rb', line 2 def method_missing(name, *args, &block) n = name.to_s if n =~ /(.*)_hook\?/ hook_defined? $1.to_sym elsif n =~ /(.*)_hook/ new_hook $1.to_sym else super end end |