Documentation

include MVC MVC.Animate MVC.Class MVC.Controller MVC.Controller.Action MVC.Controller.Action.Drag MVC.Controller.Action.Drop MVC.Controller.Action.EnterLeave MVC.Controller.Action.Event MVC.Controller.Action.Hover MVC.Controller.Action.Lasso MVC.Controller.Action.Selectable MVC.Controller.Action.Subscribe MVC.Controller.Comet MVC.Controller.Params MVC.Controller.Params.Drag MVC.Controller.Params.Drop MVC.Controller.Stateful MVC.Delegator MVC.Doc MVC.Element MVC.Event MVC.File MVC.History MVC.IO MVC.IO.Ajax MVC.IO.Comet MVC.IO.JsonP MVC.IO.WindowName MVC.IO.XDoc MVC.Model MVC.Model.Ajax MVC.Model.Cookie MVC.Model.JsonP MVC.Model.JsonRest MVC.Model.WindowName MVC.Model.XmlRest MVC.Native MVC.Native.Array MVC.Native.Date MVC.Native.Function MVC.Native.Number MVC.Native.Object MVC.Native.String MVC.Options MVC.Store MVC.SyntheticEvent MVC.Test MVC.Test.Assertions MVC.Test.Controller MVC.Test.Functional MVC.Test.Runner MVC.Test.Unit MVC.Timer MVC.Timer.Easings MVC.Vector MVC.View MVC.View.Helpers OpenAjax

MVC.Doc.Pair

Inherits: MVC.Class
A base class for a comment and the line of code following it.

Static Methods

add

add() -> undefined
Adds directives to this class.
 {
   init: function(){
     this._super();
     this.add(MVC.Doc.Directive.Return, MVC.Doc.Directive.Param)
   }
 }

create

create(comment, code, scope) -> MVC.Doc.Pair
From the comment and code, guesses at the type of comment and creates a new instance of that type.
{String} - - the comment
{String} - - the first line of source following the comment
{MVC.Doc.Pair} - - The current scope of documentation. This is typically a Class, Constructor, Static, or Prototype
{MVC.Doc.Pair} - - If a type can be found, the new Doc object; otherwise, null.

guess_type

guess_type(code) -> undefined
Tries to guess at a piece of code's type.
{Object} -

has_type

has_type(type) -> undefined
Looks for a Doc class with a className for the given type
{String} - a potential className

init

init() -> undefined
Loads a template to use to render different doc types.

sort_by_full_name

sort_by_full_name(a, b) -> undefined
Given a and b, sorts by their full_name property.
{Object} -
{Object} -

Prototype Methods

comment_setup

comment_setup() -> undefined
Goes through the comment line by line. Searches for lines starting with a @directive. If a line with a directive is found, it sees if the instance has a function that matches directive_add exists. If it does, directive_add is called on that object. If following lines do not have a directive, the directive_add_more function is called on the instance
Initial comments are added to real_comment.
This function is shared by Class and Constructor.

init

init(comment, code, scope) -> undefined
Saves coment, code. Adds self to parent. Calls code_setup and comment_setup. Finally, adds to MVC.Doc.objects.
{String} -
{String} -
{MVC.Doc.Pair} -

ordered_params

ordered_params() -> undefined
Orders params into an array.