class Sol::RuntimeModel::SolObject

Represents an Sol object instance in the Ruby world

Attributes

ruby_value[RW]
runtime_class[RW]

Public Class Methods

new(runtime_class, ruby_value=self) click to toggle source

Each object have a class (named runtime_class to prevents errors with Ruby's class method). Optionally an object can hold a Ruby value (e.g strings and numbers)

# File lib/sol/runtime/object.rb, line 12
def initialize(runtime_class, ruby_value=self)

        @runtime_class = runtime_class

        @ruby_value = ruby_value

end

Public Instance Methods

call(method, arguments=[]) click to toggle source

Call a method on the object

# File lib/sol/runtime/object.rb, line 21
def call(method, arguments=[])

        # Like a typical Class-based runtime model, we store methods in the class of the object
        @runtime_class.lookup(method).call(self, arguments)

end