sakahiro_hola 0.0.0 → 0.0.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: 08691b32651810b811fc873e5729fa419d717517
4
- data.tar.gz: 52410fdecd71e449fd8c83784e1db4796912e856
3
+ metadata.gz: 93e4b02b5a3e65324d34dce757661b25f2572c63
4
+ data.tar.gz: f061a0491e34967c33aa412d4dc54309de3e114e
5
5
  SHA512:
6
- metadata.gz: 14467dd58f9bb3774c4ed5e1c01ac3883af9ed326826d38a8ed20cd3f86716ae32c1155fd9f9fc50820c7d27c10732f976240905575e6d413d9cafa22839aa4f
7
- data.tar.gz: 6c0f156f2c3798e5a07af17315c28f851972bd83cc75a77a18d633f73d4ca40c1ba29909e1502740794ee44a3579d42c0ff6e0247688573790150016ff232e33
6
+ metadata.gz: 79fc3533a89d11cd5dad4dd9322228198d6a06061a2d7e4c7345d116297a6f28eb125a990f86b208ac44b2ede9ce21c851e3e178d9dfcf23e30bd621fcb68834
7
+ data.tar.gz: 7580f935e4499be7816cab16c0a0a24c6ef3c49544b64f321402245696d157157494bf06b1bd31ce62397b50a58f48b569887248f37c638d20e193405aa3cc8b
data/bin/sakahiro_hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'sakahiro_hola'
4
+ puts SakahiroHola.hi(ARGV[0])
data/lib/sakahiro_hola.rb CHANGED
@@ -1,5 +1,8 @@
1
- class Hola
2
- def self.hi
3
- puts "Hello world!"
1
+ class SakahiroHola
2
+ def self.hi(language = "engulish")
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
6
  end
7
+
8
+ require 'sakahiro_hola/translator'
@@ -0,0 +1,16 @@
1
+ class SakahiroHola::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "japanese"
9
+ "こんにちは"
10
+ when "spanish"
11
+ "hola mundo"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sakahiro_hola
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
  - sakahiro
@@ -12,11 +12,14 @@ date: 2010-04-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email:
15
- executables: []
15
+ executables:
16
+ - sakahiro_hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/sakahiro_hola
19
21
  - lib/sakahiro_hola.rb
22
+ - lib/sakahiro_hola/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola
21
24
  licenses:
22
25
  - MIT
@@ -37,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
40
  version: '0'
38
41
  requirements: []
39
42
  rubyforge_project:
40
- rubygems_version: 2.6.8
43
+ rubygems_version: 2.5.1
41
44
  signing_key:
42
45
  specification_version: 4
43
46
  summary: Hola!