Wires Metal
Classes, Mixins, Errors, and more.
Usage
Classes
Classes are objects that you can instantiate with new Class()
. You can also create a subclass from any existing class by calling its extend()
method.
; var MyClass = Class; var myClass = greeting: 'Hello' subject: 'World';// >> Created! Hello World!
Mixins
When working with multiple classes, sometimes you want to share functionality between them. You can easily do this by creating a new Mixin
and adding it to all the classes that need it.
; var MyMixin = { console; }; var MyClass = Class; MyClass; var myClass = ;// >> Alert! You have successfully used a Mixin!
Super
When working with subclasses, sometimes you want to modify one of the parent's methods and then calling the parent method inside. You can easily do this by calling _super
.
; var FirstClass = Class; var SecondClass = FirstClass; var secondClass = ;// >> First Class checking in!// >> Second Class checking in!
Contibuting
Getting Started
git clone git@github.com:marionette-wires/wires-metal.git && cd wires-metal
Make sure Node.js and npm are installed.
npm install
Running Tests
npm test
===
© 2014 James Kyle. Distributed under ISC license.