Class: Async::Bus::Protocol::Proxy
- Inherits:
-
BasicObject
- Defined in:
- lib/async/bus/protocol/proxy.rb
Instance Method Summary
collapse
Constructor Details
#initialize(bus, name) ⇒ Proxy
Returns a new instance of Proxy.
25
26
27
28
|
# File 'lib/async/bus/protocol/proxy.rb', line 25
def initialize(bus, name)
@bus = bus
@name = name
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*arguments, **options, &block) ⇒ Object
34
35
36
|
# File 'lib/async/bus/protocol/proxy.rb', line 34
def method_missing(*arguments, **options, &block)
@bus.invoke(@name, arguments, options, &block)
end
|
Instance Method Details
#inspect ⇒ Object
30
31
32
|
# File 'lib/async/bus/protocol/proxy.rb', line 30
def inspect
"[Proxy #{method_missing(:inspect)}]"
end
|
#respond_to?(name, include_all = false) ⇒ Boolean
38
39
40
|
# File 'lib/async/bus/protocol/proxy.rb', line 38
def respond_to?(name, include_all = false)
@bus.invoke(@name, [:respond_to?, name, include_all])
end
|