Class: Quark::MdkRuntime::Promise::CallIfIsInstance
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkRuntime::Promise::CallIfIsInstance
- 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
-
#_class ⇒ Object
Returns the value of attribute _class.
-
#_underlying ⇒ Object
Returns the value of attribute _underlying.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
- #call(arg) ⇒ Object
-
#initialize(underlying, klass) ⇒ CallIfIsInstance
constructor
A new instance of CallIfIsInstance.
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize(underlying, klass) ⇒ CallIfIsInstance
Returns a new instance of CallIfIsInstance.
318 319 320 321 322 323 324 325 |
# File 'lib/mdk_runtime/promise.rb', line 318 def initialize(, klass) self.__init_fields__ (self). = (self)._class = klass nil end |
Instance Attribute Details
#_class ⇒ Object
Returns the value of attribute _class.
311 312 313 |
# File 'lib/mdk_runtime/promise.rb', line 311 def _class @_class end |
#_underlying ⇒ Object
Returns the value of attribute _underlying.
311 312 313 |
# File 'lib/mdk_runtime/promise.rb', line 311 def end |
Instance Method Details
#__init_fields__ ⇒ Object
373 374 375 376 377 378 379 |
# File 'lib/mdk_runtime/promise.rb', line 373 def __init_fields__() self. = nil self._class = nil nil end |
#_getClass ⇒ Object
341 342 343 344 345 346 |
# File 'lib/mdk_runtime/promise.rb', line 341 def _getClass() return "mdk_runtime.promise._CallIfIsInstance" nil end |
#_getField(name) ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/mdk_runtime/promise.rb', line 348 def _getField(name) if ((name) == ("_underlying")) return (self). end if ((name) == ("_class")) return (self)._class end return nil nil end |
#_setField(name, value) ⇒ Object
361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/mdk_runtime/promise.rb', line 361 def _setField(name, value) if ((name) == ("_underlying")) (self). = ::DatawireQuarkCore.cast(value) { ::Quark.quark.UnaryCallable } end if ((name) == ("_class")) (self)._class = ::DatawireQuarkCore.cast(value) { ::Quark.quark.reflect.QuarkClass } end nil end |
#call(arg) ⇒ Object
330 331 332 333 334 335 336 337 338 339 |
# File 'lib/mdk_runtime/promise.rb', line 330 def call(arg) if ((self)._class.hasInstance(arg)) return ((self).).call(arg) else return arg end nil end |