Created
September 25, 2012 19:31
-
-
Save listrophy/3783942 to your computer and use it in GitHub Desktop.
Singleton class in Coffeescript
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
MainScreen = new class extends Screen | |
doSomething: (window) -> | |
window.buttons()[0].tap() |
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
// Generated by CoffeeScript 1.3.3 | |
var MainScreen, | |
__hasProp = {}.hasOwnProperty, | |
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | |
MainScreen = new ((function(_super) { | |
__extends(_Class, _super); | |
function _Class() { | |
return _Class.__super__.constructor.apply(this, arguments); | |
} | |
_Class.prototype.doSomething = function(window) { | |
return window.buttons()[0].tap(); | |
}; | |
return _Class; | |
})(Screen)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment