Mercurial > wow > breuesk
changeset 39:ecef0cba2913
Very handy - print the public api of an object. Nice for when you get an AceGUI object (etc) and don't know what it exposes
author | John@Doomsday |
---|---|
date | Wed, 14 Mar 2012 10:13:30 -0400 |
parents | 7bfbff27a3d7 |
children | 90622848932b |
files | Lists.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Lists.lua Wed Mar 14 08:31:31 2012 -0400 +++ b/Lists.lua Wed Mar 14 10:13:30 2012 -0400 @@ -127,6 +127,13 @@ function bsk:PrintPersons() bsk:PrintTable(bsk.persons) end +function bsk:PrintAPI(object) + for i,v in pairs(object) do + if type(v) == "function" then + bsk:Print("function "..i.."()") + end + end +end function bsk:PrintTable(table, depth) depth = depth or "" if not table then return end