Class: Zaid::Runtime::ZaidObject
- Inherits:
-
Object
- Object
- Zaid::Runtime::ZaidObject
- Defined in:
- lib/zaid/runtime/zaid_object.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ruby_value ⇒ Object
Returns the value of attribute ruby_value.
-
#runtime_class ⇒ Object
Returns the value of attribute runtime_class.
Instance Method Summary collapse
- #call(method_name, arguments = []) ⇒ Object
-
#initialize(runtime_class, ruby_value = self) ⇒ ZaidObject
constructor
A new instance of ZaidObject.
Constructor Details
#initialize(runtime_class, ruby_value = self) ⇒ ZaidObject
Returns a new instance of ZaidObject.
8 9 10 11 |
# File 'lib/zaid/runtime/zaid_object.rb', line 8 def initialize(runtime_class, ruby_value = self) @runtime_class = runtime_class @ruby_value = ruby_value end |
Instance Attribute Details
#ruby_value ⇒ Object
Returns the value of attribute ruby_value.
6 7 8 |
# File 'lib/zaid/runtime/zaid_object.rb', line 6 def ruby_value @ruby_value end |
#runtime_class ⇒ Object
Returns the value of attribute runtime_class.
6 7 8 |
# File 'lib/zaid/runtime/zaid_object.rb', line 6 def runtime_class @runtime_class end |
Instance Method Details
#call(method_name, arguments = []) ⇒ Object
13 14 15 |
# File 'lib/zaid/runtime/zaid_object.rb', line 13 def call(method_name, arguments = []) @runtime_class.lookup(method_name).call(self, arguments) end |