Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created May 28, 2009 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madrobby/119378 to your computer and use it in GitHub Desktop.
Save madrobby/119378 to your computer and use it in GitHub Desktop.
var ObjectRange = Class.create(Enumerable, (function() {
function initialize(start, end, exclusive) {
// ...
}
function _each(iterator) {
// ...
}
function include(value) {
// ...
}
return {
initialize: initialize,
_each: _each,
include: include
};
})());
instead of
var ObjectRange = Class.create(Enumerable, {
initialize: function(start, end, exclusive) {
// ...
},
_each: function(iterator) {
// ...
},
include: function(value) {
// ...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment