Name
DelegatorClass — Class creation function for Delegator patterns
Synopsis
This function dynamically creates a class that delegates to other fixed classes.
Required Library
require ‘delegate’
Function
DelegateClass(
c
)
Creates a new class to which the methods of class
c
are forwarded
Method of Generated Class
D
::new(
obj
)
Creates a delegate object with
obj
as the object to which methods are forwarded
Get Ruby in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.