hola_qthai 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
  SHA1:
3
- metadata.gz: ca25875f54c382462f900accbd69b2c6c9849bd8
4
- data.tar.gz: e365a916c978e2468c74451f95264b1233c4bcc3
3
+ metadata.gz: 4036fc9f654c44343b0359bd229b3db186fabc66
4
+ data.tar.gz: d84f463f0898ad1d6eb7e5143f028f4c6b4ce47b
5
5
  SHA512:
6
- metadata.gz: b65eca81faf7edb9a6801a51eb3fc2d8136e51f318ef0ec09c2e1aec1cf1562871ce7de56935b96cbefaca8373bd02ffd5d767ca28b77d00254106dda1154bcf
7
- data.tar.gz: a312ab4b3ba62758b3f57425e5a8a790f9bd3e504892f1ef5a1fa67f144aa78cf4e871c90651b8765f85098e8ed6eb7249ab0bab791fde569a298e8c8fac38c1
6
+ metadata.gz: 1501869dd6983451e7e74c93350d030fadcbce0d5eea8787abbff23b1da83f6e19e11b193dfeb3c5a8b43d2aefc6b8ee9001d695cf973377d676911216596266
7
+ data.tar.gz: 21a43ddcbd5cc5fb3bf06bae69f2883a22116b5e903c7f5acbb66fa237ad640fd5bf320be2358e37fefe581768dc1ecbc188a90103a9c23b5f81a63048c6f787
data/bin/hola_qthai ADDED
@@ -0,0 +1,2 @@
1
+ require 'hola_qthai'
2
+ puts HolaQthai.hi(ARGV[0])
data/lib/hola_qthai.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  class HolaQthai
2
- def self.hi
3
- puts "Hello world!"
2
+ def self.hi(language = 'english')
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
- end
6
+ end
7
+ require 'hola_qthai/translator'
@@ -0,0 +1,14 @@
1
+ class HolaQthai::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_qthai
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
  - Thai Huynh
@@ -12,11 +12,14 @@ date: 2017-08-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: qthai.huynh@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola_qthai
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_qthai
19
21
  - lib/hola_qthai.rb
22
+ - lib/hola_qthai/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_qthai
21
24
  licenses:
22
25
  - MIT