Class: TurmaliObject

Inherits:
Object
  • Object
show all
Defined in:
lib/turmali/runtime/object.rb

Direct Known Subclasses

TurmaliClass

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runtime_class, ruby_value = self) ⇒ TurmaliObject

Returns a new instance of TurmaliObject.



4
5
6
7
# File 'lib/turmali/runtime/object.rb', line 4

def initialize(runtime_class, ruby_value=self)
  @runtime_class = runtime_class
  @ruby_value = ruby_value
end

Instance Attribute Details

#ruby_valueObject

Returns the value of attribute ruby_value.



2
3
4
# File 'lib/turmali/runtime/object.rb', line 2

def ruby_value
  @ruby_value
end

#runtime_classObject

Returns the value of attribute runtime_class.



2
3
4
# File 'lib/turmali/runtime/object.rb', line 2

def runtime_class
  @runtime_class
end

Instance Method Details

#call(method, arguments = []) ⇒ Object



9
10
11
# File 'lib/turmali/runtime/object.rb', line 9

def call(method, arguments=[])
  @runtime_class.lookup(method).call(self, arguments)
end