| changeset 1072 | ac1eacb3aa33 |
| parent 1071 | 02c04d2c8fd8 |
| child 1073 | 687133dc13cf |
| 1071:02c04d2c8fd8 | 1072:ac1eacb3aa33 |
|---|---|
1 var Person = makeClass( |
|
2 /** |
|
3 @scope Person |
|
4 */ |
|
5 { |
|
6 /** |
|
7 This is just another way to define a constructor. |
|
8 @constructs |
|
9 @param {string} name The name of the person. |
|
10 */ |
|
11 initialize: function(name) { |
|
12 this.name = name; |
|
13 }, |
|
14 say: function(message) { |
|
15 return this.name + " says: " + message; |
|
16 } |
|
17 } |
|
18 ); |