Method: Class.new
- Defined in:
- lib/source/ruby.rb
.new(class_name, superclass = Object) ⇒ Object
call-seq:
Class.new(class_name, superclass = Object) -> class
Creates a new class with the given superclass (or Object if no superclass is given). Unlike in Ruby, where you need only assign the class object to a constant in order to give it a name, in Red you must also pass the class name as a string argument.
FIX: Incomplete
1060 1061 1062 1063 |
# File 'lib/source/ruby.rb', line 1060 def self.new(class_name, superclass = Object) `$class(className._value,superclass,function(){})` return `window['c$'+className._value]` end |