Class: Quark::Quark::CallIfIsInstance
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::Quark::CallIfIsInstance
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/quark.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.
2886 2887 2888 2889 2890 2891 2892 2893 |
# File 'lib/quark.rb', line 2886 def initialize(, klass) self.__init_fields__ (self). = (self)._class = klass nil end |
Instance Attribute Details
#_class ⇒ Object
Returns the value of attribute _class.
2879 2880 2881 |
# File 'lib/quark.rb', line 2879 def _class @_class end |
#_underlying ⇒ Object
Returns the value of attribute _underlying.
2879 2880 2881 |
# File 'lib/quark.rb', line 2879 def end |
Instance Method Details
#__init_fields__ ⇒ Object
2941 2942 2943 2944 2945 2946 2947 |
# File 'lib/quark.rb', line 2941 def __init_fields__() self. = nil self._class = nil nil end |
#_getClass ⇒ Object
2909 2910 2911 2912 2913 2914 |
# File 'lib/quark.rb', line 2909 def _getClass() return "quark._CallIfIsInstance" nil end |
#_getField(name) ⇒ Object
2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 |
# File 'lib/quark.rb', line 2916 def _getField(name) if ((name) == ("_underlying")) return (self). end if ((name) == ("_class")) return (self)._class end return nil nil end |
#_setField(name, value) ⇒ Object
2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 |
# File 'lib/quark.rb', line 2929 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
2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 |
# File 'lib/quark.rb', line 2898 def call(arg) if ((self)._class.hasInstance(arg)) return ((self).).call(arg) else return arg end nil end |