#Class
[DESCRIPTION]
General
Installation
npm install eden-class
Usage
var class = require('eden-class');
Methods
argument
[Argument] argument();
Argument Testing
Parameters
Returns
[Argument]
Example
Code
class().argument();
Outputs
RESULTS
capture
object capture(Bool);
For Async we lose the protected and private access. This grabs it before it is removed from the scope
Parameters
- bool
Returns
object
Example
Code
class().capture();
Outputs
RESULTS
inspect
this inspect(Mixed, String|null);
Force outputs any class property
Parameters
-
mixed
-
string|null
Returns
this
Example
Code
class().inspect();
Outputs
RESULTS
loadState
this loadState(*string);
Returns a state that was previously saved
Parameters
- *string - the state name
Returns
this
Example
Code
class().loadState();
Outputs
RESULTS
loop
this loop(*function, Integer);
Loops through returned result sets
Parameters
-
*function
-
integer
Returns
this
Example
Code
class().loop();
Outputs
RESULTS
on
this on(*string, *function, Bool);
Attaches an instance to be notified when an event has been triggered
Parameters
-
*string
-
*function
-
bool
Returns
this
Example
Code
class().on();
Outputs
RESULTS
once
this once(*string, Function);
Attaches an instance to be notified when an event has been triggered, when the event was fired it will be removed on the event stack.
Parameters
-
*string
-
function
Returns
this
Example
Code
class().once();
Outputs
RESULTS
saveState
this saveState(*string, Mixed);
Sets instance state for later usage.
Parameters
-
*string - the state name
-
mixed
Returns
this
Example
Code
class().saveState();
Outputs
RESULTS
sync
[Syncopate] sync(Function);
Starts a synchronous thread
Parameters
- function
Returns
[Syncopate]
Example
Code
class().sync();
Outputs
RESULTS
trigger
this trigger(*string, Mixed[,mixed..]);
Notify all observers of that a specific event has happened
Parameters
-
*string
-
mixed[,mixed..]
Returns
this
Example
Code
class().trigger();
Outputs
RESULTS
when
this when(*mixed, *function);
Invokes Callback if conditional callback is true
Parameters
-
*mixed
-
*function
Returns
this
Example
Code
class().when();
Outputs
RESULTS