Permalink
Browse files

added LICENSE and updated README with useful info

  • Loading branch information...
kikito committed Oct 10, 2010
1 parent a579e51 commit 95fcd29e01fb755e86fa26ac19ca1eb73bfaa94d
Showing with 72 additions and 0 deletions.
  1. +25 −0 BSD-LICENSE.txt
  2. 0 README
  3. +47 −0 README.textile
View
@@ -0,0 +1,25 @@
+Copyright (c) 2010, Enrique García Cota
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ 3. Neither the name of middleclass-extras nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
View
0 README
No changes.
View
@@ -0,0 +1,47 @@
+h1. middleclass-extras
+
+This is a set of additions to "middleclass":http://www.github.org/kikito/middleclass.
+
+h1. Module brief description
+
+What follows is a brief description of each of the middleclass-extras modules. Each nodule is commented
+out with usage examples. You can find more examples on the /spec/ folder.
+
+* @Sender@ is a very small mixin that can be used to 'send' methods to instances. It's main advantage
+ is that it accepts both method names and lua functions on its parameters.
+* @GetterSetter@ just adds a couple convenience getXXX, setXXX methods to your class.
+* @Beholder@ is a small signaling/event controller mixin. Your classes can 'observe' and 'stop observing'
+ events. Note that @Beholder@ requires sender to be included.
+* @Callbacks@ is a powerful mixin that allows you to add 'hooks' to any existing method. For example,
+ you can specify on runtime that you want to call a method after initializing one object.
+* Mindstate defines stateful objects. Classes receive a new method called 'addState', and instances
+ receive a new method called gotoState. The behaviour of each of the instance methods can be redefined
+ per-state.
+
+h1. Installation
+
+Note that middleclass-extras includes middleclass as a git submodule.
+
+In order to download middleclass-extras using git, you will have to do the following:
+
+<pre>
+ git clone git://github.com/kikito/middleclass-extras.git
+ cd middleclass-extras
+ git submodule init
+ git submodule update
+</pre>
+
+h2. Usage
+
+middleclass-extras is prepared to be required like this:
+
+<pre>
+ require('middleclass-extras.init')
+</pre>
+
+Notes:
+* You can remove the .init part above if your loading path already includes it
+* You must make sure that your package.path variable includes the folder inmediately above of middleclass-extras.
+For example, if middleclass-extras is inside a directory called 'libs', you must do:
+
+package.path = 'libs/?;' .. package.path

0 comments on commit 95fcd29

Please sign in to comment.