Class: Kach

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

Defined Under Namespace

Classes: Translator

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Kach

Returns a new instance of Kach.



2
3
4
# File 'lib/kach.rb', line 2

def initialize(name)
  @name = name
end

Class Method Details

.hi(name) ⇒ Object



6
7
8
# File 'lib/kach.rb', line 6

def self.hi(name)
  "hi #{name} from kach!"
end

Instance Method Details

#say_helloObject



10
11
12
13
# File 'lib/kach.rb', line 10

def say_hello
  translator = Kach::Translator.new("spanish")
  "#{translator.hi}: #{@name}"
end