Skip to content

Instantly share code, notes, and snippets.

@arekt
Created June 26, 2013 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arekt/5866015 to your computer and use it in GitHub Desktop.
Save arekt/5866015 to your computer and use it in GitHub Desktop.
class Assignment
constructor: (o) ->
$.map o, (v,k) =>
@name = k
@app = v
class System
constructor: (o) ->
@users = $.map o.users, (v,k) =>
new User(k,v)
class User
constructor: (name, roles) ->
@name = ko.observable(name)
@r = roles
@roles = $.map roles(), (v,k) ->
new Assignment(v)
window.System = System
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment