PageRenderTime 32ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Registry.io

http://github.com/pgregory/blackpool
Unknown | 16 lines | 12 code | 4 blank | 0 comment | 0 complexity | 6b90c8d6745c0addc227fb57c5e5cbd5 MD5 | raw file
  1. Registry := Object clone do(
  2. init := method(
  3. items ::= List clone
  4. )
  5. register := method(item,
  6. items append(item)
  7. (items size - 1) asString
  8. )
  9. find := method(key,
  10. items at(key asNumber)
  11. )
  12. )