Class: GemTutorial

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

Overview

This class is responsible for exposing methods to be used from the gem

Defined Under Namespace

Classes: Translator

Class Method Summary collapse

Class Method Details

.hi(language = 'english') ⇒ nil

Print ‘hello world’ depending on the language passed in

Parameters:

  • language (String) (defaults to: 'english')

    the language

Returns:

  • (nil)

    Prints ‘hello world’.



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

def self.hi(language = 'english')
  translator = Translator.new(language)
  translator.hi
end