hola_hxcan_1 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: e4852c98413f2aed43a0779e78c2127e25489137
4
- data.tar.gz: 11937cb5ef249afeb55b033c1916d7689846f9d8
3
+ metadata.gz: 830af2f5f2a551b9d5e4a7afb20cee25255aa17a
4
+ data.tar.gz: b562efd50d36953a9cef0f6987926abe17654c26
5
5
  SHA512:
6
- metadata.gz: 83a7f234491371ac13ac2c4e48febfc0e352a0925910a1ff81e03daf3a8ecd3efaad17868e02b239a4f789cc3d6329f2bc78be484ea16cdaebcc500dcd6c4991
7
- data.tar.gz: b260bd47f471fc3671c44b0eb106e055388fe705873878c1006836b6c159486d1a75e1a14b7fd1ce9cbd03b7cdd276ba17bc4c1619e1629ae7d376d067d708da
6
+ metadata.gz: 31c7f4c2a800b97d305aecb347da356dc0c0b07356f8359b9dce4763f3859cf2119c3e58121a2441321e061e4f66ef77078b1863d9faeb34d871cd60c6410a81
7
+ data.tar.gz: 2715722fad174f2b7587d800236b7d0b064e1f7072e613371cb4d101aafd46c4c416363cda7d590e7550373c97121d1253e4306e44989807c44a0286b887b99d
data/bin/hola_hxcan_1 ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_hxcan_1'
4
+
5
+ puts HolaHxcan1.hi(ARGV[0])
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ class HolaHxcan1::Translator
4
+ def initialize(language)
5
+ @language = language
6
+ end
7
+
8
+ def hi
9
+ case @language
10
+ when "spanish"
11
+ "hola mundo"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
data/lib/hola_hxcan_1.rb CHANGED
@@ -1,7 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  class HolaHxcan1
4
- def self.hi
5
- puts "Hello world!"
4
+ def self.hi(language = "english")
5
+ translator = Translator.new(language)
6
+ translator.hi
6
7
  end
7
8
  end
9
+
10
+ require 'hola_hxcan_1/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_hxcan_1
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
  - Hxcan Cai
@@ -12,11 +12,14 @@ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: caihuosheng@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola_hxcan_1
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_hxcan_1
19
21
  - lib/hola_hxcan_1.rb
22
+ - lib/hola_hxcan_1/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_hxcan_1
21
24
  licenses:
22
25
  - MIT