PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/app/components/MenuComponent.io

http://github.com/pgregory/blackpool
Unknown | 18 lines | 14 code | 4 blank | 0 comment | 0 complexity | beb4169ee5ddeb8d9c5ae4ac08520f3e MD5 | raw file
 1MenuComponent := Object clone do(
 2  init := method(
 3    entries ::= List clone
 4  )
 5
 6  renderOn := method(html,
 7    entries foreach(v,
 8      html link(v at(0), v at(1))
 9      html space
10    )
11  )
12
13  addEntry := method(name, callback, 
14    entries append(list(name, callback))
15  )
16)
17
18