It is a port and advanced implementation of Ruby's core object/module/class system in JavaScript code, as well as several standard Ruby libraries and various other extensions.
Here are some key features of "JS.Class":
General Features:
· Method binding
· Ruby-like object system with classes, mixins, and singleton methods
· Late-binding arguments-optional super calls to parent classes and mixins
· Included, extended and inherited hooks
· Reflection APIs for the object system
· Conventions for object equality, comparison, iteration and hashing
· Versions of various standard Ruby modules and data structures
Works with:
· Node
· V8
· Rhino
· Narwhal
· SpiderMonkey
· Windows Script Host
Requirements:
· JavaScript enabled on client side
What's New in This Release: [ read full changelog ]
· All components now run on a much wider array of platforms
· JS.Class is now tested using its own test framework, JS.Test.
· New libraries: Benchmark, Console, Deferrable, OrderedHash, Range, OrderedSet, TSort.
· HashSet has become the base Set implementation, and the original Set implementation has been removed
· StackTrace has been totally overhauled to support extensible user-defined tracing functionality
· New core method Module#alias() for aliasing methods
· User-defined keyword methods using Method.keyword()
· JS.Class no longer supports subclassing the Class class
· Module#instanceMethod() returns a Method, not a Function
· Enumerable#grep() now supports selecting by type, e.g. items.grep(Array). It does not support functional predicates like items.grep(function(x) { return x == 0 }), you should use Enumerable#select() for this
· Objects with the same properties, and Arrays with the same elements are now considered equal when used as Hash keys
· MethodChain#fire() is now called MethodChain#__exec__()
· JS.Ruby has been removed