/app/components/Counter.io

http://github.com/pgregory/blackpool · Unknown · 11 lines · 10 code · 1 blank · 0 comment · 0 complexity · 70653d18ecd982e5254a5c3cf0a83313 MD5 · raw file

  1. Counter := Object clone do(
  2. init := method(
  3. count ::= 0
  4. )
  5. renderOn := method(html,
  6. html h1 with( html text("Counter: " .. count))
  7. html link("--", block(count = count - 1))
  8. html link("++", block(count = count + 1))
  9. )
  10. )