Skip to content

Commit e64ea37

Browse files
author
Badacadabra
committed
Do minor corrections
1 parent 4749af5 commit e64ea37

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

src/CoffeeScript/GoF/Creational/Factory/Factory.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ debian = LinuxDistrosFactory.getLinuxDistro LinuxDistrosFactory.DEBIAN
5454
redhat = LinuxDistrosFactory.getLinuxDistro LinuxDistrosFactory.REDHAT
5555
slackware = LinuxDistrosFactory.getLinuxDistro LinuxDistrosFactory.SLACKWARE
5656

57-
console.log debian.boot(); # Debian is booting...
58-
console.log redhat.boot(); # RedHat is booting...
59-
console.log slackware.boot(); # Slackware is booting...
57+
console.log debian.boot() # Debian is booting...
58+
console.log redhat.boot() # RedHat is booting...
59+
console.log slackware.boot() # Slackware is booting...

src/Vanilla/GoF/Creational/AbstractFactory/AbstractFactory-ES5.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ OS9.prototype = Object.create(MacRelease.prototype);
7272
OS9.prototype.constructor = OS9;
7373

7474
var OSX = function () {
75-
MacRelease.call(this, "MAC OS X");
75+
MacRelease.call(this, "Mac OS X");
7676
};
7777
OSX.prototype = Object.create(MacRelease.prototype);
7878
OSX.prototype.constructor = OSX;
@@ -126,7 +126,7 @@ Object.defineProperties(OSFactory, {
126126
case OSFactory.WINDOWS:
127127
return new WindowsFactory();
128128
default:
129-
throw new Error("The factory you are looking for has not been found");
129+
throw new Error("The factory you are looking for has not been found.");
130130
}
131131
},
132132
enumerable: true
@@ -171,7 +171,7 @@ LinuxFactory.prototype.getLinuxDistro = function (id) {
171171
case LinuxFactory.REDHAT:
172172
return new RedHat();
173173
default:
174-
throw new Error("The Linux distribution you are looking for has not been found");
174+
throw new Error("The Linux distribution you are looking for has not been found.");
175175
}
176176
};
177177

@@ -201,7 +201,7 @@ MacFactory.prototype.getMacRelease = function (id) {
201201
case MacFactory.OSX:
202202
return new OSX();
203203
default:
204-
throw new Error("The Mac release you are looking for has not been found");
204+
throw new Error("The Mac release you are looking for has not been found.");
205205
}
206206
};
207207

@@ -231,9 +231,9 @@ WindowsFactory.prototype.getWindowsVersion = function (id) {
231231
case WindowsFactory.VISTA:
232232
return new Vista();
233233
default:
234-
throw new Error("The Windows version you are looking for has not been found");
234+
throw new Error("The Windows version you are looking for has not been found.");
235235
}
236-
}
236+
};
237237

238238
// ==============================
239239
// CLIENT CODE

src/Vanilla/GoF/Creational/AbstractFactory/AbstractFactory-ES6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class MacFactory extends OSFactory {
184184

185185
class WindowsFactory extends OSFactory {
186186
static get XP() { return 0; }
187-
static get Vista() { return 1; }
187+
static get VISTA() { return 1; }
188188

189189
getWindowsVersion(id) {
190190
switch (id) {

src/Vanilla/GoF/Creational/Builder/Builder-ES6.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
// ==============================
42
// PC (PRODUCT)
53
// ==============================

src/Vanilla/GoF/Structural/Adapter/Adapter-ES6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ class HDMIToVGAAdapter extends DigitalInterface {
5454
// CLIENT CODE
5555
// ==============================
5656

57-
var adapter = new HDMIToVGAAdapter();
57+
let adapter = new HDMIToVGAAdapter();
5858

5959
console.log(adapter.handleDigitalSignal()); // Your computer uses HDMI and your projector uses VGA

src/Vanilla/GoF/Structural/Facade/Facade-ES6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ class HowToFeedAnimals {
4141
}
4242

4343
feedAnimals() {
44-
return `${this._dog.eat()} ${this._rabbit.eat()}`;
44+
return `${this._dog.eat()}${this._rabbit.eat()}`;
4545
}
4646
}
4747

4848
// ==============================
4949
// CLIENT CODE
5050
// ==============================
5151

52-
var facade = new HowToFeedAnimals();
52+
let facade = new HowToFeedAnimals();
5353

5454
console.log(facade.feedAnimals());

0 commit comments

Comments
 (0)