Skip to content

Instantly share code, notes, and snippets.

View pablobm's full-sized avatar

Pablo Brasero pablobm

View GitHub Profile
function bondage(object, method_name) {
return function() {
return object[method_name].apply(object, arguments);
}
}
class Person(){
}
Person.prototype.doSomething = function() {
// Do something...
#
# hputs(): makes debug messages readable when debugging specs with the TextMate RSpec bundle
#
def hputs(*args)
puts ERB::Util.html_escape(args.join("\n")).gsub(/\r?\n/, '<br/>') + '<br/>'
end