Class: Ractor::Wrapper::Stub
- Inherits:
-
Object
- Object
- Ractor::Wrapper::Stub
- Defined in:
- lib/ractor/wrapper.rb
Overview
A stub that forwards calls to a wrapper.
This object is shareable and can be passed to any Ractor.
Instance Method Summary collapse
-
#initialize(wrapper) ⇒ Stub
constructor
Create a stub given a wrapper.
Constructor Details
#initialize(wrapper) ⇒ Stub
Create a stub given a wrapper.
186 187 188 189 |
# File 'lib/ractor/wrapper.rb', line 186 def initialize(wrapper) @wrapper = wrapper freeze end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
Forward calls to Ractor::Wrapper#call.
195 196 197 |
# File 'lib/ractor/wrapper.rb', line 195 def method_missing(name, ...) @wrapper.call(name, ...) end |