Class: Translator
- Inherits:
-
DinnerLab_Plaid
- Object
- DinnerLab_Plaid
- Translator
- Defined in:
- lib/DinnerLab_Plaid/translator.rb
Instance Method Summary collapse
- #hi ⇒ Object
-
#initialize(language) ⇒ Translator
constructor
A new instance of Translator.
Methods inherited from DinnerLab_Plaid
Constructor Details
#initialize(language) ⇒ Translator
Returns a new instance of Translator.
3 4 5 6 |
# File 'lib/DinnerLab_Plaid/translator.rb', line 3 def initialize(language) @language = language end |
Instance Method Details
#hi ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/DinnerLab_Plaid/translator.rb', line 8 def hi if (@language == 'korean') hello = "안녕하세요." puts hello hello elsif (@language == 'english') hello = "Hello World." puts hello hello else hello = "Ugh, hello..." puts hello hello end end |