Class: TorqueBox::Mailer::Extensions::Proxy
- Inherits:
- BasicObject
- Defined in:
- lib/torquebox/mailer/extensions/generic_proxy.rb
Overview
A lightweight and generic proxy class that is easily serializable
Instance Method Summary collapse
-
#initialize(performable, target, options = {}) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(performable, target, options = {}) ⇒ Proxy
Returns a new instance of Proxy.
7 8 9 10 11 |
# File 'lib/torquebox/mailer/extensions/generic_proxy.rb', line 7 def initialize(performable, target, = {}) @performable = performable @target = target @opts = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
13 14 15 |
# File 'lib/torquebox/mailer/extensions/generic_proxy.rb', line 13 def method_missing(name, *args) @performable.perform(@target, name, *args) end |