- Inheritance
- < Object
Delegator is an abstract class used to build delegator pattern objects from subclasses. Subclasses should redefine __getobj__. For a concrete implementation, see SimpleDelegator.
Constants
| Name | Description | |
|---|---|---|
| IgnoreBacktracePat | = %r"\A#{Regexp.quote(__FILE__)}:\d+:in `" |
Aliases
| Method | Alias | Description |
|---|---|---|
| initialize | → initialize_methods |
Methods
Class
| Visibility | Signature |
|---|---|
| public | new (obj) |
Instance
| Visibility | Signature |
|---|---|
| public | __getobj__ () |
| public | marshal_dump () |
| public | marshal_load (obj) |
| public | method_missing (m, *args) |
| public | respond_to? (m) |
Class Method Detail
new(obj)
Pass in the obj to delegate method calls to. All methods supported by obj will be delegated to.
Instance Method Detail
__getobj__()
This method must be overridden by subclasses and should return the object method calls are being delegated to.
marshal_dump()
Serialization support for the object returned by __getobj__.
marshal_load(obj)
Reinitializes delegation from a serialized object.
method_missing(m, *args)
Handles the magic of delegation through __getobj__.
respond_to?(m)
Checks for a method provided by this the delegate object by fowarding the call through __getobj__.