1 | | // Generated by CoffeeScript 1.3.3 |
2 | 1 | (function() { |
3 | 1 | var Greeter; |
4 | | |
5 | 1 | Greeter = (function() { |
6 | | |
7 | 1 | function Greeter(lang) { |
8 | 10 | this.lang = lang; |
9 | 10 | if (!(this.lang != null)) { |
10 | 1 | this.lang = 'en'; |
11 | | } |
12 | | } |
13 | | |
14 | 1 | Greeter.prototype.sayHello = function(name) { |
15 | 6 | switch (this.lang) { |
16 | | case 'jp': |
17 | 2 | return "" + (name != null ? "" + name + "\u3055\u3093\u3001" : "") + "\u3053\u3093\u306B\u3061\u306F\u3002"; |
18 | | case 'zh': |
19 | 2 | return "" + (name != null ? "" + name + "\uFF0C" : "") + "\u4F60\u597D\uFF01\u5403\u4E86\u6CA1\uFF1F"; |
20 | | default: |
21 | 2 | return "Hello" + (name != null ? ", " + name : "") + "!"; |
22 | | } |
23 | | }; |
24 | | |
25 | 1 | return Greeter; |
26 | | |
27 | | })(); |
28 | | |
29 | 1 | exports.Greeter = Greeter; |
30 | | |
31 | | }).call(this); |