Class: Quark::MdkRuntime::Promise::Callback
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkRuntime::Promise::Callback
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/mdk_runtime/promise.rb
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#_callable ⇒ Object
Returns the value of attribute _callable.
-
#_next ⇒ Object
Returns the value of attribute _next.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
- #call(result) ⇒ Object
-
#initialize(callable, next_) ⇒ Callback
constructor
A new instance of Callback.
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize(callable, next_) ⇒ Callback
Returns a new instance of Callback.
190 191 192 193 194 195 196 197 |
# File 'lib/mdk_runtime/promise.rb', line 190 def initialize(callable, next_) self.__init_fields__ (self)._callable = callable (self)._next = next_ nil end |
Instance Attribute Details
#_callable ⇒ Object
Returns the value of attribute _callable.
183 184 185 |
# File 'lib/mdk_runtime/promise.rb', line 183 def _callable @_callable end |
#_next ⇒ Object
Returns the value of attribute _next.
183 184 185 |
# File 'lib/mdk_runtime/promise.rb', line 183 def _next @_next end |
Instance Method Details
#__init_fields__ ⇒ Object
242 243 244 245 246 247 248 |
# File 'lib/mdk_runtime/promise.rb', line 242 def __init_fields__() self._callable = nil self._next = nil nil end |
#_getClass ⇒ Object
210 211 212 213 214 215 |
# File 'lib/mdk_runtime/promise.rb', line 210 def _getClass() return "mdk_runtime.promise._Callback" nil end |
#_getField(name) ⇒ Object
217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/mdk_runtime/promise.rb', line 217 def _getField(name) if ((name) == ("_callable")) return (self)._callable end if ((name) == ("_next")) return (self)._next end return nil nil end |
#_setField(name, value) ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/mdk_runtime/promise.rb', line 230 def _setField(name, value) if ((name) == ("_callable")) (self)._callable = ::DatawireQuarkCore.cast(value) { ::Quark.quark.UnaryCallable } end if ((name) == ("_next")) (self)._next = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.promise.Promise } end nil end |
#call(result) ⇒ Object
202 203 204 205 206 207 208 |
# File 'lib/mdk_runtime/promise.rb', line 202 def call(result) event = ::Quark.mdk_runtime.promise._CallbackEvent.new((self)._callable, (self)._next, result) (@_next)._dispatcher._queue(event) nil end |