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
Object.prototype.class = function () { | |
return "8th Grade"; | |
} |
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
feature 'viewing the webpage' do | |
switch_driver :webkit | |
scenario 'viewing from a webkit browser' do | |
... | |
end | |
end | |
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
(function($){ | |
jQuery.fn.mouseyDialog = function() { | |
// Classic Class Structure (note: no var, it's exposed for TDD) | |
MouseyDialog = function(anchor) { | |
this.anchor = $(anchor); | |
this.dialog = $(this.anchor.attr('href')); | |
this.button = $('<a href="#" class="mouseyDialog_close">close</a>'); | |
}; | |
MouseyDialog.prototype = { |
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
var Person = Micro.extend(function(name) { | |
this.name = name; | |
}); | |
Person.include({ | |
greet: function() { | |
print('Hello, ' + this.name + '!'); | |
} | |
}); |
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
var Micro = (function() { | |
var proxy = function() {}; | |
var wrap = function(zuper, fn) { | |
return function() { | |
var saved = this.zuper; | |
this.zuper = zuper; | |
try { | |
return fn.apply(this, arguments); | |
} finally { | |
this.zuper = saved; |