codecombat/app/templates/play/level/tome/spell_palette_entry_popover.jade
2014-02-14 16:52:50 -08:00

44 lines
1 KiB
Text

h4
span= doc.shortName
| -
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
if doc.type != 'function'
| (read-only)
.description!= marked(doc.description || 'Still undocumented, sorry.')
if doc.example
p.example
strong Example:
div!= marked("```\n" + doc.example + "```")
else if doc.type == 'function'
p.example
strong Example:
div
code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
p.value
strong Current Value:
pre
code.current-value(data-prop=doc.name)= value
if doc.args && doc.args.length
p.args
strong Parameters:
for arg in doc.args
div
code= arg.name
| :
code= arg.type
if arg.example
| (ex:
code= arg.example
| )
if arg.description
div!= marked(arg.description)
if arg.default
div
em Default value:
code= arg.default