Class: Heimdall::ObjectProxy
Instance Method Summary collapse
-
#initialize(object) ⇒ ObjectProxy
constructor
A new instance of ObjectProxy.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(object) ⇒ ObjectProxy
Returns a new instance of ObjectProxy.
17 18 19 |
# File 'lib/heimdall/heimdall_proxy.rb', line 17 def initialize object @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/heimdall/heimdall_proxy.rb', line 21 def method_missing name, *args dump = Marshal.dump [@object, name, args] dump = Base64.encode64 dump dump = dump.sub %r{=*\s*$}, '' Heimdall.add HeimdallProxyWorker, b64: dump true end |