Class: Kach
- Inherits:
-
Object
- Object
- Kach
- Defined in:
- lib/kach.rb
Defined Under Namespace
Classes: Translator
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Kach
constructor
A new instance of Kach.
- #say_hello ⇒ Object
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_hello ⇒ Object
10 11 12 13 |
# File 'lib/kach.rb', line 10 def say_hello translator = Kach::Translator.new("spanish") "#{translator.hi}: #{@name}" end |