Forums

@help and cobra -doc-lib

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

@help and cobra -doc-lib

Postby Charles » Wed May 09, 2012 8:41 am

There is a compile-time Cobra feature called @help, which shows you the interface of a class. Want to see the interface to String in Cobra terms? Then:
class X

def main
@help String
# or
s = ''
@help s

The significance of @ is that this is used for compiler directives.

During compilation, each @help creates an HTML file with the Cobra interface to the type as well as handy search links to different sites (Cobra, Stackoverflow, Google, MSDN) and a footer section showing env vars that you can use to customize what @help outputs.

There is also a command line option for Cobra to output docs for a library called "cobra -doc-lib:...". See "cobra -help" for more information. -doc-lib is often in need of maintenance. If you have any problems with it, please report them with specifics so we can improve it.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Return to Discussion

Who is online

Users browsing this forum: No registered users and 30 guests