Skip to content

Instantly share code, notes, and snippets.

@davidklaw
Created October 31, 2014 20:51
Show Gist options
  • Save davidklaw/6c03ff0ef1eaac976d15 to your computer and use it in GitHub Desktop.
Save davidklaw/6c03ff0ef1eaac976d15 to your computer and use it in GitHub Desktop.
Sketch Object Dump
// Dump Object
function dump_obj(obj){
log("#####################################################################################")
log("## Dumping object " + obj )
log("## obj class is: " + [obj className])
log("#####################################################################################")
log("obj.properties:")
log([obj class].mocha().properties())
log("obj.propertiesWithAncestors:")
log([obj class].mocha().propertiesWithAncestors())
log("obj.classMethods:")
log([obj class].mocha().classMethods())
log("obj.classMethodsWithAncestors:")
log([obj class].mocha().classMethodsWithAncestors())
log("obj.instanceMethods:")
log([obj class].mocha().instanceMethods())
log("obj.instanceMethodsWithAncestors:")
log([obj class].mocha().instanceMethodsWithAncestors())
log("obj.protocols:")
log([obj class].mocha().protocols())
log("obj.protocolsWithAncestors:")
log([obj class].mocha().protocolsWithAncestors())
log("obj.treeAsDictionary():")
log(obj.treeAsDictionary())
}
@chadobado
Copy link

Total life saver.. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment