Created
March 25, 2010 04:08
-
-
Save jackhq/343163 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base | |
name: "Base" | |
children: [] | |
find: (name) -> | |
for child in this.children | |
if child.name == name | |
result: child | |
break | |
result | |
add: (child) -> | |
this.children[this.children.length]: child | |
class Application extends Base | |
version: "0.0.1" | |
run: (options) -> | |
this.find(options.controller)[options.action ?= 'index'](options.params ?= {} ) | |
class Controller extends Base | |
name: "Controller" | |
class View | |
name: "View" | |
render: -> | |
print "Not Implemented" | |
window.View: View | |
window.Controller: Controller | |
window.Application: new Application() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment