Skip to content

Commit 5a1baa4

Browse files
committed
Change name of class from 'Expresso' to 'Espresso'. Thanks larionov
1 parent 2912972 commit 5a1baa4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

Decorator/Espresso.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var Espresso = function()
2+
{
3+
Beverage.apply(this);
4+
this.sDescription = 'Espresso';
5+
};
6+
Espresso.prototype = new Beverage();
7+
Espresso.prototype.cost = function()
8+
{
9+
return 1.99;
10+
};

Decorator/Expresso.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

Decorator/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
<title>Decorator Pattern</title>
44
<script type="text/javascript" src="Beverage.js"></script>
55
<script type="text/javascript" src="CondimentDecorator.js"></script>
6-
<script type="text/javascript" src="Expresso.js"></script>
6+
<script type="text/javascript" src="Espresso.js"></script>
77
<script type="text/javascript" src="HouseBlend.js"></script>
88
<script type="text/javascript" src="Mocha.js"></script>
99
<script type="text/javascript" src="Whip.js"></script>
1010
</head>
1111
<body>
1212
<script type="text/javascript">
13-
var oHouseBlendWithMochaAndWhip = new Expresso();
14-
oHouseBlendWithMochaAndWhip = new Mocha(oHouseBlendWithMochaAndWhip);
15-
oHouseBlendWithMochaAndWhip = new Whip(oHouseBlendWithMochaAndWhip);
16-
17-
console.log(oHouseBlendWithMochaAndWhip.cost());
13+
var oEspressoWithMochaAndWhip = new Espresso();
14+
oEspressoWithMochaAndWhip = new Mocha(oEspressoWithMochaAndWhip);
15+
oEspressoWithMochaAndWhip = new Whip(oEspressoWithMochaAndWhip);
16+
17+
console.log(oEspressoWithMochaAndWhip.cost());
1818
</script>
1919
</body>
2020
</html>

0 commit comments

Comments
 (0)