Ruby like methods for javascript as prototypes