Class: Hanks::Translator
- Inherits:
-
Object
- Object
- Hanks::Translator
- Defined in:
- lib/hanks/translator.rb
Instance Method Summary collapse
- #hi ⇒ Object
-
#initialize(language) ⇒ Translator
constructor
A new instance of Translator.
Constructor Details
#initialize(language) ⇒ Translator
Returns a new instance of Translator.
4 5 6 |
# File 'lib/hanks/translator.rb', line 4 def initialize(language) @language = language end |
Instance Method Details
#hi ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hanks/translator.rb', line 8 def hi case @language when "spanish" "hanks mundo" when "english" "hello world" else "ruby" end end |