Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Created December 5, 2009 03:36
Show Gist options
  • Save cloudhead/249528 to your computer and use it in GitHub Desktop.
Save cloudhead/249528 to your computer and use it in GitHub Desktop.
var Router = {
context: {
from: function(arg) {
return {
to: function(arg) { return arg; }
}
}
},
map: function(block) {
block.call(this.context);
}
}
Router.map(function() {
this.from("paris").to("new york");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment