Foo.js

  1. /**
  2. * Represents all foos
  3. * If the '@examples' path is a directory, it's assumed to contain
  4. * examples files for each function, named as '<function name>.js'
  5. * @examples ./test/data/examples/Foo
  6. */
  7. class Foo {
  8. /**
  9. * Start with a number
  10. * @param {*} num a number
  11. */
  12. constructor (num) {
  13. this.num = num
  14. }
  15. /**
  16. * What is the bar of str?
  17. * @param {*} str
  18. */
  19. bar (str) {
  20. return str + this.num
  21. }
  22. /**
  23. * Resets this.num
  24. * @param {*} num
  25. */
  26. reset (num) {
  27. this.num = num
  28. }
  29. }
  30. module.exports = Foo