Skip to content

Latest commit

 

History

History

forward

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Forwarder / Delegation pattern using Modulation

The forward or delegate pattern forwards method calls to an arbitrary receiver object. In this example, the imported module exports a single method, #receiver=, used to set the receiver. All method calls to the module are intercepted using #method_missing and then forwarded / delegated to the receiver.

The application demonstrates forwarding calls to the Time class using the forwarder module.