-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcode.js
77 lines (58 loc) · 1.6 KB
/
code.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Man = Ember.Object.extend({
hobbies: [],
dislikes: [],
sayCatchPhrase: function() {
}
});
AverageJoe = Man.extend({
hobbies: ['lying around'],
dislikes: ['working'],
sayCatchPhrase: function() {
console.log("Let's go to the coffee shop?");
}
});
SuperPowers = Ember.Mixin.create({
powers: []
});
arnold = Man.create({
hobbies: ['kicking asses', 'shooting with his shotgun', 'being BACK!'],
dislikes: ['Choir boys.'],
sayCatchPhrase: function() {
console.log("I'm a cybernetic organism living tissue over metal endoskeleton.");
console.log('I WILL BE BACK!!!');
}
});
SuperHero = Man.extend(SuperPowers, {
});
superMario = SuperHero.create({
hobbies: ['Saving the princess', 'Eating shrooms', 'Stomping goombas'],
dislikes: ['turtles', 'goombas'],
powers: ['jumping', 'breaking bricks', 'going into pipes', 'fire flower!!!'],
sayCatchPhrase: function() {
console.log("Ita sa mii Mario!!!");
}
});
Bulgarian = AverageJoe.extend({
firstName: '',
familyName: '',
nickname: '',
sayCatchPhrase: function() {
console.log("Let's drink some Beer/Rakia/Vodka/Rom/Antifreeze!?");
},
fullName: function() {
var firstName = this.get('firstName'),
familyName = this.get('familyName'),
nickname = this.get('nickname');
return "%@ %@ - %@".fmt(firstName, familyName, nickname);
}.property('firstName', 'familyName', 'nickname')
});
meddle = Bulgarian.create({
firstName: 'Nickolay',
familyName: 'Tzvetinov',
nickname: 'Meddle'
});
misho = Bulgarian.create({
firstName: 'Mihail',
familyName: 'Mihailov',
nickname: 'Shamara'
});