hola-sl 0.0.1 → 0.0.2

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: 0df6c9d20108da016b7bdc59949b97b6692f2260da63724ddb7bf90f77a6ac8b
4
- data.tar.gz: 36b90bbed6d274392b9dd2b3589ae079d2e6ba636b33c0cbcf8375875a4d3d5e
3
+ metadata.gz: d0dc048e8941b6d810e7c9dea111835b8f8ba142b5675c0868421b4052e3ee6b
4
+ data.tar.gz: 64b0dc563e7f2e1f3f8e54fc511866cc86226c1a9b4a7c4140eef5d940f46541
5
5
  SHA512:
6
- metadata.gz: 8c58e3735be014cb33c896769f4516c4443860818cb25925069272eecc55858828715adfc9bf2cac8b3f8a87fd489ace2423e2fc78f866a195077652ec123a06
7
- data.tar.gz: bf938009ef95280a5a76affd7db572c77e8fe93ae6cba99525e69175fefccdf48d1ad3885e88d685d9718cf60aaa921cda673f184ecd27b018a606875033ecce
6
+ metadata.gz: 96c947e393bba3e5db0d94adb7b0f0ee44820f210ae122884eae162366307bf256f8fc5b2dad9516a1e531cb9452db5efdf0372932488db7037525fab3b1d000
7
+ data.tar.gz: d0b22d8539dbe5795abbc5f241b5af5e092b2a5949789ceff5f1197c1c237806b81239587dad85d0bba95d3f08bce23fe1e19e12ee3ed6611dfb13838e9af371
data/bin/hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/user/bin/env ruby
2
+
3
+ require 'hola'
4
+ puts Hola.hi(ARGV[0])
data/lib/hola.rb CHANGED
@@ -1,5 +1,11 @@
1
+
1
2
  class Hola
2
- def self.hi
3
- puts "hi"
3
+ def self.hi(language = "english")
4
+ translator = Translator.new(language)
5
+ translator.hi
4
6
  end
5
- end
7
+ end
8
+
9
+ require 'hola/translator'
10
+
11
+
@@ -0,0 +1,14 @@
1
+ class Hola::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-sl
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
  - liusilan
@@ -12,11 +12,14 @@ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: hola
14
14
  email: xx
15
- executables: []
15
+ executables:
16
+ - hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola
19
21
  - lib/hola.rb
22
+ - lib/hola/translator.rb
20
23
  homepage: http://www.baidu.com
21
24
  licenses:
22
25
  - MIT