lhok 0.1.0 → 0.1.1

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: 8b2e7fd2c47253e323dfe0f98df2c8ae67880250
4
- data.tar.gz: 8514210e8a241e9274007c6791c60b0a2ac7bcfc
3
+ metadata.gz: 2a6b56db8a1e99d9cddb5ebc8ed139270f70d54f
4
+ data.tar.gz: 50be5bc34214900875fc806ab9aaec9b0747d025
5
5
  SHA512:
6
- metadata.gz: 32741cdaf49fd9a057d861d02234f03a6b1ba4366dfcfdbb34d319ffe468c145829c7603ce6453634d451308f8910b861af5c5c4d0eb14dcc0c74d4980605f86
7
- data.tar.gz: 52fc46182317465ed6fb9e0b9e6a0e9a964d10dabef70a723528b28345b3314d34afb297e1755ee2d0435fc1024e3b79f25418a352a0360d9c6e08c955fac85a
6
+ metadata.gz: 0601ad67b318f224aa66bc0616e15fa113150dc80770349d709e8dec7a97f76f3cceeeb680758a3c32acbd9e2d01875147f6e0093e7a3f486ac7cac4410a8ec0
7
+ data.tar.gz: f9d08f70bf437ce0a5b7a9300c622ac16fcfa3e6729658c5d47529b34936985524e93dc8d1214eee12a13c0ed32a6cd44e0d53cf925abaa730d2ece40cd7c6e6
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'lhok'
4
+ puts Lhok::Lhok.hi(ARGV[0])
@@ -1,9 +1,10 @@
1
1
  require "lhok/version"
2
-
3
2
  module Lhok
4
3
  class Lhok
5
- def self.hi
6
- "hello world."
7
- end
4
+ def self.hi(language = "english")
5
+ translator = Translator.new(language)
6
+ translator.hi
7
+ end
8
8
  end
9
9
  end
10
+ require 'lhok/translator'
@@ -0,0 +1,16 @@
1
+ class Lhok::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ when "chinese"
11
+ "你好 世界"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module Lhok
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - lhok
@@ -66,9 +66,11 @@ files:
66
66
  - README.md
67
67
  - Rakefile
68
68
  - bin/console
69
+ - bin/lhok
69
70
  - bin/setup
70
71
  - lhok.gemspec
71
72
  - lib/lhok.rb
73
+ - lib/lhok/translator.rb
72
74
  - lib/lhok/version.rb
73
75
  homepage: http://hbsage.com.cn
74
76
  licenses: []