I'm not down with the new(er) [Ruby hash syntax][0]. I'm not down.
In javascript, I can do this:
hash = {
first : "one"
second : "two"
third : "three"
}
-- @param _construct: map args --> object | |
-- @param tcurtsnoc_: map object --> args | |
Klass = function (_construct, tcurtsnoc_) | |
local constructor | |
local function copy(o) | |
return constructor(tcurtsnoc_(o)) | |
end | |
constructor = function (...) |
I'm not down with the new(er) [Ruby hash syntax][0]. I'm not down.
In javascript, I can do this:
hash = {
first : "one"
second : "two"
third : "three"
}
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
var Stack = function () { | |
return { | |
pop: function() { | |
throw "popped from an empty stack"; | |
}, | |
push: function(value) { | |
return (function (self) { | |
return _.extend({}, self._incrementCount(), { | |
head: value, | |
pop: function () { |
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
title An Auspicious Day v0.2.1 | |
author arrogant.gamer | |
homepage www.arrogantgamer.com | |
flickscreen 20x10 | |
color_palette proteus_rich | |
======== | |
OBJECTS | |
======== |
var obj = (function (){ | |
var self = { | |
foo: function () { | |
return 'foo'; | |
}, | |
namespace: { | |
bar: function () { | |
return self.foo(); | |
} | |
} |
MyApp.Views.MasterDetailLayout = Backbone.Marionette.Layout.extend({ | |
template: 'backbone/templates/master_detail_layout', | |
regions: { | |
master: "#master", | |
detail: "#detail" | |
}, | |
initialize: function() { | |
console.log('MasterDetailLayout->initialize'); |
.lovely { | |
color: lavender; | |
} |