Here you will see divers code snippets about meta programming with Ruby.
The first snippet here shows a example the method callback named method_exists()
.
This method is trigged when a method that not exists in one class is executed. The implementation here use
define_method(name)
to create a new method in runtime!!