Created
March 12, 2014 05:33
-
-
Save aostrega/9501428 to your computer and use it in GitHub Desktop.
Proposed solution to Opal issue #440
This file contains hidden or 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 Opal 0.6.0 */ | |
(function(ಠopal) { | |
var self = ಠopal.top, ಠscope = ಠopal, nil = ಠopal.nil, ಠbreaker = ಠopal.breaker, ಠslice = ಠopal.slice, ಠklass = ಠopal.klass, user = nil; | |
ಠopal.add_stubs(['ಠattr_accessor', 'ಠ==', 'ಠnew', 'ಠputs', 'ಠadmin?']); | |
(function(ಠbase, ಠsuper) { | |
function ಠUser(){}; | |
var self = ಠUser = ಠklass(ಠbase, ಠsuper, 'User', ಠUser); | |
var def = self._proto, ಠscope = self._scope; | |
def.name = nil; | |
self.ಠattr_accessor("name"); | |
def.ಠinitialize = function(name) { | |
var self = this; | |
return self.name = name; | |
}; | |
return (def['ಠadmin?'] = function() { | |
var self = this; | |
return self.name['ಠ==']("Admin"); | |
}, nil); | |
})(self, null); | |
user = ಠscope.User.ಠnew("Bob"); | |
self.ಠputs(user); | |
return self.ಠputs(user['ಠadmin?']()); | |
})(Opal); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment