Class: Zoidberg::HardShell::AsyncProxy
- Inherits:
-
Object
- Object
- Zoidberg::HardShell::AsyncProxy
- Defined in:
- lib/zoidberg/shell.rb
Instance Attribute Summary collapse
-
#locked ⇒ Object
readonly
Returns the value of attribute locked.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(instance, locked) ⇒ AsyncProxy
constructor
A new instance of AsyncProxy.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize(instance, locked) ⇒ AsyncProxy
Returns a new instance of AsyncProxy.
185 186 187 188 |
# File 'lib/zoidberg/shell.rb', line 185 def initialize(instance, locked) @target = instance @locked = locked end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
189 190 191 192 |
# File 'lib/zoidberg/shell.rb', line 189 def method_missing(*args, &block) target._async_request(locked ? :blocking : :nonblocking, *args, &block) nil end |
Instance Attribute Details
#locked ⇒ Object (readonly)
Returns the value of attribute locked.
184 185 186 |
# File 'lib/zoidberg/shell.rb', line 184 def locked @locked end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
184 185 186 |
# File 'lib/zoidberg/shell.rb', line 184 def target @target end |