Skip to content

Instantly share code, notes, and snippets.

@mooz
Created August 13, 2010 01:16
Show Gist options
  • Save mooz/522076 to your computer and use it in GitHub Desktop.
Save mooz/522076 to your computer and use it in GitHub Desktop.
literal
HERE()
.input()
.the()
.string()
.and()
["this method chain"]()
.returns()
.accumulated()
.string();
function HERE() {
if (!(this instanceof HERE))
return new HERE();
this.strs = [];
}
HERE.prototype = {
__noSuchMethod__:
function (line) {
this.strs.push(line);
return this;
},
toString: function () {
return this.strs ? this.strs.join("\n") : "";
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment