#

API Docs for: 0.0.1
Show: Inherited Protected Private Deprecated

# MonkeyBars Class

- Index
- Methods
- Properties

## Item Index

### Methods

- createPropertyDescriptorsWithAttributes
- createSubTasksFromTaskOptionsArray
- createTaskWithOptions
- extend
- forTaskDecorator
- generateUniqueId
- isTaskDependentOnTask
- resetTask
- whenTaskDecorator
- whileTaskDecorator

### Properties

- MonkeyBars
- root
- TaskDecorators static
- taskIdCounter
- TaskStates static
- TaskTypes static

## Methods

### `createPropertyDescriptorsWithAttributes`

(

- `attributes`

)
private

Defined in `../monkeybars.js:150`

Creates property descriptors from the passes attributes.

#### Parameters:

- `attributes` Object

### `createSubTasksFromTaskOptionsArray`

(

- `tasks`

)
private

Defined in `../monkeybars.js:133`

Creates an array of tasks based on the options array passed.

#### Parameters:

- `tasks` Array

### `createTaskWithOptions`

(

- `options`

)
private

Defined in `../monkeybars.js:78`

Creates task based on the options passed.

#### Parameters:

- `options` Object

### `extend`

(

- `protoProps`

)
Function

Defined in `../monkeybars.js:228`

Extention functionality for various task types.

#### Parameters:

- `protoProps` Object

#### Returns:

Function: child Constructor function for extended task type

#### Example:

            var CustomTask = MonkeyBars.Task.extend({
                name:"CustomTask",
                newMethod:function(){
                    console.log("Executing newMethod");
                }
            });

            var instance = new CustomTask();

### `forTaskDecorator`

(

- `task`

)
private

Defined in `../monkeybars.js:1266`

Decorator to provide for loop functionality for the task. The task executes as many times as referenced by the count attribute provided by the instance.

#### Parameters:

- `task` Object

### `generateUniqueId`

(

- `prefix`

)
String private

Defined in `../monkeybars.js:188`

Generates a unique id for each task.

#### Parameters:

- `prefix` String

#### Returns:

String: tid

### `isTaskDependentOnTask`

(

- `task1`
- `task2`

)
private

Defined in `../monkeybars.js:202`

Determains whether the first task is dependent on the second.

#### Parameters:

- `task1` Task
- `task2` Task

### `resetTask`

(

- `task`

)
private

Defined in `../monkeybars.js:171`

Resets the task to its original non executed state.

#### Parameters:

- `task` Object

### `whenTaskDecorator`

(

- `task`

)
private

Defined in `../monkeybars.js:1322`

The task doesnt execute until the when method provided returns true.

#### Parameters:

- `task` Object

### `whileTaskDecorator`

(

- `task`

)
private

Defined in `../monkeybars.js:1292`

Decorator to provide while loop functionaliy. The task executed until the `while` method returns false.

#### Parameters:

- `task` Object

## Properties

### `MonkeyBars`

Object

Defined in `../monkeybars.js:56`

Object returned by module. Works as namespace for the task library.

### `root`

Object private

Defined in `../monkeybars.js:38`

A dictionary of dependencies for sub tasks

### `TaskDecorators`

Object static

Defined in `../monkeybars.js:1378`

description needed

### `taskIdCounter`

Integer private

Defined in `../monkeybars.js:47`

Counter used to create unique task ids

### `TaskStates`

Object static

Defined in `../monkeybars.js:1348`

description needed

### `TaskTypes`

Object static

Defined in `../monkeybars.js:1364`

description needed