/app/components/MenuComponent.io

http://github.com/pgregory/blackpool · Unknown · 18 lines · 14 code · 4 blank · 0 comment · 0 complexity · beb4169ee5ddeb8d9c5ae4ac08520f3e MD5 · raw file

  1. MenuComponent := Object clone do(
  2. init := method(
  3. entries ::= List clone
  4. )
  5. renderOn := method(html,
  6. entries foreach(v,
  7. html link(v at(0), v at(1))
  8. html space
  9. )
  10. )
  11. addEntry := method(name, callback,
  12. entries append(list(name, callback))
  13. )
  14. )