also.js 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @class */
  2. function Asset() {
  3. this._name = '';
  4. this._shape = '';
  5. this._shhhhKeepThisSecret = '';
  6. }
  7. /**
  8. *
  9. * Set the value of the name property.
  10. * @param {string} newName
  11. *
  12. *//**
  13. *
  14. * Get the value of the name property.
  15. * @returns {string}
  16. *
  17. */
  18. Asset.prototype.name = function(newName) {
  19. if (newName) { this._name = newName; }
  20. else { return this._name; }
  21. };
  22. /**
  23. * Set the value of the shape property.
  24. * @param {string} newShape
  25. *//**
  26. * Set the value of the shape property, plus some other property.
  27. * @param {string} newShape
  28. * @param {string} mysteryProperty
  29. *//**
  30. * Get the value of the shape property.
  31. * @returns {string}
  32. */
  33. Asset.prototype.shape = function(newShape, mysteryProperty) {
  34. if (newShape && mysteryProperty) {
  35. this._shape = newShape;
  36. this._shhhhKeepThisSecret = mysteryProperty;
  37. }
  38. else if (newShape) {
  39. this._shape = newShape;
  40. }
  41. else {
  42. return this._shape;
  43. }
  44. };