tlhello 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c8d0fd44c85fb5cc1c701150c8eeddb71f98e2b2f9d342268daaa8dfcdaf4b18
4
+ data.tar.gz: bbd24565a61daa698377b4202fb26831e1caae15d33fcd8968a1c6896ac8e56b
5
+ SHA512:
6
+ metadata.gz: 4bb8b503fd98df100a5b074ba495eb1f884fa7e172b3420e3ca833dd4b3d130f0f12b735c8eb4d8636e0256fdb82481fcc6283204646ce064e7852859472daab
7
+ data.tar.gz: aa72f3b4c2c966ba1fe180082d4ff2c86396b6cccf2d08d96fa19994d69a23e0c20726c2611b903a9332205961f7799fd3a4ec1583150c1b6d68d232cd4665c7
data/bin/tlhello ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tlhello'
4
+ puts TLHello.hi(ARGV[0])
@@ -0,0 +1,15 @@
1
+ class Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ puts(@language)
8
+ case @language
9
+ when "spanish"
10
+ "hola mundo"
11
+ else
12
+ "hello world"
13
+ end
14
+ end
15
+ end
data/lib/tlhello.rb ADDED
@@ -0,0 +1,9 @@
1
+ class TLHello
2
+ def self.hi(language = "english")
3
+ translator = Translator.new(language)
4
+ translator.hi()
5
+ end
6
+ end
7
+
8
+ require './hello/translator.rb'
9
+
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tlhello
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - tongzhanggui
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-12-22 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 第一次创建gem文件
14
+ email: tonglin930@163.com
15
+ executables:
16
+ - tlhello
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/tlhello
21
+ - lib/hello/translator.rb
22
+ - lib/tlhello.rb
23
+ homepage: http://rubygems.org/gems/tlhello
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubygems_version: 3.1.4
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: tongzhanggui first gem
46
+ test_files: []