new core/createClass()
Class Factory - Creates new class with core methods.
- Source:
Members
ref :Object
Instance reference.
Type:
- Object
- Source:
Methods
get(name) → {*}
Returns value of a property.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Property name. |
- Source:
Returns:
Value of property.
- Type
- *
inc(name, value) → {Object}
Increments given number property as given value.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Property name. |
value |
number | Value to increment. |
- Source:
Returns:
Instance reference.
- Type
- Object
isImplementedBy(Interface) → {boolean}
To check is this an instance implemented by given interface.
Parameters:
Name | Type | Description |
---|---|---|
Interface |
Interface | Interface |
- Source:
Returns:
If it is implemented by given interface.
- Type
- boolean
isInstanceOf(Class) → {boolean}
To check is this an instance of given class or a class extends given class.
Parameters:
Name | Type | Description |
---|---|---|
Class |
Class | Class |
- Source:
Returns:
If it is instance of given class.
- Type
- boolean
set(name, value) → {Object}
Sets a value to a property.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Property name. |
value |
* | Property value. |
- Source:
Returns:
Instance reference.
- Type
- Object
unset(name) → {Object}
Unsets / deletes a property.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Property name. |
- Source:
Returns:
Instance reference.
- Type
- Object