hola_ti 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.
data/bin/hola_ti ADDED
@@ -0,0 +1,2 @@
1
+ require 'hola_ti'
2
+ puts Hola.hi(ARGV[0])
@@ -0,0 +1,15 @@
1
+ class Translator
2
+ def initialize(lang)
3
+ @lang = lang
4
+ end
5
+
6
+ def hi
7
+ case @lang
8
+ when "japanese"
9
+ "konnichiwa"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
15
+
data/lib/hola_ti.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class Hola
2
- def self.hi
3
- puts "Hello world!"
2
+ def self.hi(lang = "english")
3
+ translator = Translator.new(lang)
4
+ translator.hi
4
5
  end
5
6
  end
7
+
8
+ require 'hola/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_ti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,14 @@ date: 2014-05-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple hello world gem
15
15
  email: i0001c48@yahoo.co.jp
16
- executables: []
16
+ executables:
17
+ - hola_ti
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/hola_ti.rb
22
+ - lib/hola/translator.rb
23
+ - bin/hola_ti
21
24
  homepage:
22
25
  licenses:
23
26
  - MIT