Pathology
disease JavaScript and its causes, processes, development, and consequences.
The scientific study of the nature of Ember.js has AWESOME toString() support for objects. And I wanted some of that magic sauce. But I'm not ready to commit to Ember.js for the project I'm working on, there is just too much existing code.
Right now this only really does the following:
# Pathology = require "pathology" # One ugly-ish thing about pathology. # You've got to explicitly name your top-level # namespaces. Unlike Ember, Pathology isn't going # to go rooting around the global namespace looking # for your objects. Root = PathologyNamespacecreate"Root" # However, Pathology doesn't need you to explicitly name # your further nested namespaces. As long as all your objects # are connected to a root level Namespace. # You can even reference your objects elsewhere for convenience. Subspace = Root.Subspace = PathologyNamespacecreate # Pathology provides a basic Object with extend/create semantics. Subspace.Thing = PathologyObjectextend : something = SubspaceThingcreateproperty: "value" # And this all comes together for the final awesome-sauce. puts SubspaceThingtoString# => <Root.Subspace.Thing> puts somethingtoString# => <Root.Subspace.Thing __#-9>