Class: BoneHola::Translator
- Inherits:
-
Object
- Object
- BoneHola::Translator
- Defined in:
- lib/bone_hola/translator.rb
Instance Method Summary collapse
-
#hi ⇒ Object
Say hi to the world through tree languanges.
-
#initialize(language) ⇒ Translator
constructor
init say language.
Constructor Details
#initialize(language) ⇒ Translator
init say language
8 9 10 |
# File 'lib/bone_hola/translator.rb', line 8 def initialize(language) self.language = language end |
Instance Method Details
#hi ⇒ Object
Say hi to the world through tree languanges
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bone_hola/translator.rb', line 13 def hi case language when "english" "Hello World!" when "spanish" "hola mundo!" else "你好,世界!" end end |