hola_viet 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62fd84670b5fb30490bf2eec1faaa6c0607c6cf151533b69ab0a409ab8298d3
4
- data.tar.gz: 5f0f2329b0816a6aa0ed816ec4def43deb4657a9058d0d3a0aadd5c9af417e0c
3
+ metadata.gz: 1687dfa3b5159182fc3234cf5826422a4c0159e2da09c40751d48747da1ec7cb
4
+ data.tar.gz: fc17dce5c5b3eb0ab8b6960ea2a3010301a95822c1700a947500c4a951f5f465
5
5
  SHA512:
6
- metadata.gz: d239bbb07d989e338c39e8a602e923548879a757f510b1ea98554778bce2a2364365f02214618f3f9b095626accab125f830da9158b489018523ca69cc4f2c49
7
- data.tar.gz: 61699cca1005772a7ae93710afae8cf0520f5a540c6322c7210dbf165d250855866b0da5a36c71c27047e49baa09e6965a48d4b634ae6ef297f1bdb064021957
6
+ metadata.gz: 325af9be32d06f8c2b3dc57a848dea26a1ecddc8350e0e78e6f798481f81700f62d7cb338c05c08372ace2b3155e651184e5d53fd67009c38c0009dccbff1396
7
+ data.tar.gz: a5ea0a183cacef225ebab067f2723cbf09534a54e75d838e368e9ae18b506f66f8054a07b8128747119e11267b7b8a22bffe9216ed15d1621f82d5b231025d72
data/bin/hola_viet ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_viet'
4
+ puts HolaViet.hi(ARGV[0])
@@ -0,0 +1,14 @@
1
+ class HolaViet::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when 'spanish'
9
+ 'Hola Vietdeptrai!'
10
+ else
11
+ 'Hello Vietdeptrai!'
12
+ end
13
+ end
14
+ end
data/lib/hola_viet.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class HolaViet
2
- def self.hi
3
- puts 'Hello Vietdeptrai!'
2
+ def self.hi(language = 'english')
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
6
  end
7
+
8
+ require 'hola_viet/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_viet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nguyen Thanh Viet
@@ -12,11 +12,14 @@ date: 2022-05-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: nguyenthanhviet31031998@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola_viet
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_viet
19
21
  - lib/hola_viet.rb
22
+ - lib/hola_viet/translator.rb
20
23
  homepage: https://rubygems.org/gems/hola_viet
21
24
  licenses:
22
25
  - MIT