Class: Hellotm::Translator
- Inherits:
-
Object
- Object
- Hellotm::Translator
- Defined in:
- lib/hellotm/translator.rb
Instance Method Summary collapse
- #hello ⇒ Object
-
#initialize(language) ⇒ Translator
constructor
A new instance of Translator.
Constructor Details
#initialize(language) ⇒ Translator
2 3 4 |
# File 'lib/hellotm/translator.rb', line 2 def initialize(language) @language = language end |
Instance Method Details
#hello ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/hellotm/translator.rb', line 6 def hello if @language == "french" return "Bonjour tout le monde !" else return "Hello World" end end |