gem_tutorial_kcheung 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0418bb78c39242f141f88bf8fe8cc180d4f039c92fef495acd3c995dba7a91a
4
- data.tar.gz: 197c0feb206b58716bd53ea41775f47a40a27b8190c4c034edf6ba456d5d5b5a
3
+ metadata.gz: 21a72cd49a6d8f7bd209116c53e24884eb46de0c7200c3a63455e077e5b47190
4
+ data.tar.gz: dc16836e91f22374f2603e54ebedd34965fb18dcf309f61b1598e91c7a42f11e
5
5
  SHA512:
6
- metadata.gz: 74a2f9804bc7b9df0495e88d5dda83e0fea9b6023ba10524ed47068ce4a89ec0bffd23a01829ac162f11e93f3886b4320d5bc63df03785aaac786151e2c2be79
7
- data.tar.gz: 5adf480723b4e0713721c9caef2d6e005647bf1fbfedbfd91a24c6703cee8724630fa2045e3ca401f7215521dd23079cd8d0fc327c74127d1d00317314bd077b
6
+ metadata.gz: e9ac0cd6d9d0c846989fcf3ca2fe6779981ce4c94919f66d63b78d0ed3679988591e0e9e976ee64873cf7a70115ea78d63ddd6e55a8a107100d59c8991f8c03a
7
+ data.tar.gz: b08f3d6c725e850d245f9478d9bbfaaebb1bc76afe3826349ea73bad6feac2336f1cca303b31e64fc738beaf3f9c8a1b4e3a6ac53a9193f2debff1467ae3163b
@@ -1,14 +1,22 @@
1
+ # This class is responsible for translating "hello world" based on the
2
+ # given language
1
3
  class GemTutorial::Translator
4
+ # Initialize translator with language
5
+ #
6
+ # @param language [String] the language
2
7
  def initialize(language)
3
8
  @language = language
4
9
  end
5
10
 
11
+ # Print 'hello world' depending on the class language passed in
12
+ #
13
+ # @return [nil] Prints 'hello world'.
6
14
  def hi
7
15
  case @language
8
16
  when 'spanish'
9
17
  'hola mundo'
10
18
  else
11
- 'hellow world'
19
+ 'hello world'
12
20
  end
13
21
  end
14
22
  end
@@ -1,4 +1,10 @@
1
+ # This class is responsible for exposing methods to be used from
2
+ # the gem
1
3
  class GemTutorial
4
+ # Print 'hello world' depending on the language passed in
5
+ #
6
+ # @param language [String] the language
7
+ # @return [nil] Prints 'hello world'.
2
8
  def self.hi(language = 'english')
3
9
  translator = Translator.new(language)
4
10
  translator.hi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_tutorial_kcheung
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kcheung