madrobby (owner)

Revisions

  • e97f2d Thu May 28 08:15:50 -0700 2009
gist: 119378 Download_button fork
public
Public Clone URL: git://gist.github.com/119378.git
Embed All Files: show embed
JavaScript #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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) {
    // ...
  }
});