Skip to content

Instantly share code, notes, and snippets.

@johnnyhalife
Forked from anonymous/closure.sample.js
Created May 17, 2012 19:55
Show Gist options
  • Save johnnyhalife/2721238 to your computer and use it in GitHub Desktop.
Save johnnyhalife/2721238 to your computer and use it in GitHub Desktop.
goog.provide("murally.SampleClass");
goog.require("murally.SomeParentClass");
/**
* @constructor
* @param {string} name
* @extends {murally.SomeParentClass}
*/
murally.SampleClass = function(name) {
goog.base(this);
/**
* @private
* @type {string}
*/
this._name = name;
};
goog.inherits(murally.SampleClass, murally.SomeParentClass);
goog.scope(function() {
var SampleClass = murally.SampleClass;
/**
* @returns {string}
*/
SampleClass.prototype.getName = function(){
return this._name;
};
/**
* @inheritDoc
*/
SampleClass.prototype.doInheritedStuff = function(){
goog.base(this, "doInheritedStuff");
};
/**
* @returns {string}
*/
SampleClass.prototype.doStuff = function(){
return "puto el que lee" + this._name;
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment