Skip to content

Instantly share code, notes, and snippets.

@probablycorey
Created November 4, 2010 00:06
Show Gist options
  • Select an option

  • Save probablycorey/661923 to your computer and use it in GitHub Desktop.

Select an option

Save probablycorey/661923 to your computer and use it in GitHub Desktop.
waxClass{"Comic", Base}
function all(callback)
return get{url("/features"), callback = function(json, response)
local success, error = wasSuccessful(response)
if success then
local comics = table.map(json, function(c)
return Comic:initWithAttrs(c)
end)
callback(comics, nil)
else
callback(nil, error)
end
end}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment