Class: RKelly::JS::ObjectPrototype

Inherits:
Base
  • Object
show all
Defined in:
lib/rkelly/js/object_prototype.rb

Overview

This is the object protytpe ECMA-262 15.2.4

Direct Known Subclasses

FunctionPrototype

Instance Attribute Summary

Attributes inherited from Base

#properties, #return, #value

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #can_put?, #default_value, #delete, #has_property?, #returned?

Constructor Details

#initializeObjectPrototype

Returns a new instance of ObjectPrototype.



6
7
8
9
10
11
# File 'lib/rkelly/js/object_prototype.rb', line 6

def initialize
  super
  self['toString'].function = unbound_method(:toString) do
    "[object #{self['Class'].value}]"
  end
end