tags:

views:

54

answers:

1

Hi,

how should I document this piece of code:

// Is this class?
colors = {

  // Is this method?
  "red" : function() {
     // Do something...
  }

  // Still method?
  "black" : {

     // So what is this?
     "black-1" : function() { /* Do something */ }

   }

}

I am using YUI Doc.

These tags are available

  • @module
  • @class
  • @method
  • @event
  • @property
A: 

From using YUI, its docs, and a quick skim of the YUI Doc explanation page, it's my impression that it assumes that you're using the module pattern.

You don't have a module.

  • colors => @static @class
  • red => @method
  • black => @property
  • black-1 => "internal" (ish) so it's not anything under this taxonomy.
wombleton