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
jasmine.PrettyPrinter.prototype.iterateObject = (obj, fn) -> | |
for own property, _ of obj | |
if property == '__Jasmine_been_here_before__' | |
continue | |
fn(property, if obj.__lookupGetter__ then (obj.__lookupGetter__(property) != jasmine.undefined && obj.__lookupGetter__(property) != null) else false) | |
jasmine.StringPrettyPrinter::originalEmitObject = jasmine.StringPrettyPrinter::emitObject | |
jasmine.StringPrettyPrinter::emitObject = (obj) -> | |
if obj instanceof jQuery |
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
// the node OOP-way | |
function Awake () { | |
var networkConnector = NetworkConnector(isHost()); | |
networkConnector.connect(function() { | |
spawnPlayer(); | |
}); | |
} | |
// the unity3d-ish way |
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
named_scope :sort_string, lambda do |type| | |
order_string = case type | |
when 'score' | |
"score desc" | |
when 'date' | |
"created_at desc" | |
else | |
raise "Unknown type passed into sort_string: #{type.inspect}" | |
end |
NewerOlder