Grape.Object Class
A fake class to represent default class methods
Item Index
Methods
- extend static
- extends static
- getClass
- instanceOf
- parent
Methods
extend
(
Class
static
-
[name]
-
[methods]
Creates a new class, which extends this class. X.extend(a, b) is the same as Grape.Class(a,X,b)
Parameters:
-
[name]
String optionalThe class name
-
[methods]
Object optionalClass methods
Returns:
Class:
The new class
extends
(
Boolean
static
-
clazz
Tells whether the given class is a parent of the current class.
Parameters:
-
clazz
ClassThe class
Returns:
Boolean:
true, if the given class is a parent
getClass
()
Class
Returns the instance's constructor class
Returns:
Class:
instanceOf
(
Boolean
-
clazz
Tells that the current instance is an instance of a class, or it's descendants.
Parameters:
-
clazz
Class
Returns:
Boolean:
true, if yes.
parent
(
Function
-
clazz
-
method
Creates a proxy for calling a parent method
Parameters:
-
clazz
ClassThe parent, whose method will be called
-
method
StringMethod name
Returns:
Function:
Method proxy. When called, calls the parent method with the parameters, and original context.
Properties
className
String
static
The name of the class if set, or a generated string.
id
Number
static
An unique number for the class, mainly for indexing purposes