Class: Hola::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/hola_karlo.rb

Instance Method Summary collapse

Constructor Details

#initialize(language) ⇒ Translator

Returns a new instance of Translator.



9
10
11
# File 'lib/hola_karlo.rb', line 9

def initialize(language)
  @language = language
end

Instance Method Details

#hiObject



13
14
15
16
17
18
19
20
# File 'lib/hola_karlo.rb', line 13

def hi
  case @language
  when "spanish"
    "hola mundo"
  else
    "hello world"
  end
end