Class: Hanks::Translator

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

Instance Method Summary collapse

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

#hiObject



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