class Granite::PerformerProxy::Proxy
Proxy
helps to wrap the following method call with performer-enabled context.
Public Class Methods
new(klass, performer)
click to toggle source
# File lib/granite/performer_proxy/proxy.rb, line 7 def initialize(klass, performer) @klass = klass @performer = performer end
Public Instance Methods
inspect()
click to toggle source
# File lib/granite/performer_proxy/proxy.rb, line 12 def inspect "<#{@klass}PerformerProxy #{@performer}>" end
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/granite/performer_proxy/proxy.rb, line 16 def method_missing(method, *args, &block) if @klass.respond_to?(method) @klass.with_proxy_performer(@performer) do @klass.public_send(method, *args, &block) end else super end end
respond_to_missing?(*args)
click to toggle source
# File lib/granite/performer_proxy/proxy.rb, line 26 def respond_to_missing?(*args) @klass.respond_to?(*args) end