Skip to content

Conversation

@alexisferreyra
Copy link

  • Class.$define : keeps a table of existing classes to allow forward declaration of types:
Animal = Class.$define("Animal"); // forward declaration of class Animal

Horse = Class.$define("Horse", Animal, {  /* Horse methods here */  });

Animal = Class.$define("Animal", { /* animal methods here */ });
  • Class.$append : allows extending existing class object with new methods:
Animal = Class.$extend({ /* methods here */ });

Animal.$append({ newMethod: function(){ 
/*........*/ } 
});

This can be used as shortcut with $define.

  • Tests fixed and tests added for new methods.

- Class.$append : allows extending existing class object with new methods
- Class.$define : keeps a table of existing classes to allow forward declaration of types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant