hello-hola 0.0.1 → 0.1.0

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: cdf10a3b1c14daacdf3ad7b3a1943012115781ad
4
- data.tar.gz: 12bd57e1d53ae37f982743a2759f75fe905a1752
3
+ metadata.gz: c1586cc6f4a501e77b5f1aaac452e1bfcff62f23
4
+ data.tar.gz: 21f67a47fe581d34779b8a953ce842dbcc5183d4
5
5
  SHA512:
6
- metadata.gz: a8c6ad062885fc5cbba3fb74b555551259b9d83f12fcce1b50071e28a16234bcd79d1216307fe48b686edfa2e8d42036fb33ffbcc103120c40631557c632b2e5
7
- data.tar.gz: 899bb19a5add2a0641ec9a3794bcbcb7fb0d63d360d0f2f2273c1f4f814d29225e4d6f22f16e607d00e95fa45b8c54e8c5254e4bb466bb99f43a921f09e368f9
6
+ metadata.gz: a6722153549f9eb91474ae7cf081230bfb614c496d5dff77eaa228f022cb5f568fabde003725a91a6723557ad57a54befa5d5acdff0a45f75f65a6e3bec03af3
7
+ data.tar.gz: 240f2bdbda43b4b0c118a2b74a0d6af73817d2a8171623ca5517c42cf11e38ba9b677c236cd6ba3dd5780be96b0f8804687681a48c5aa1932f7aa9a41e1858d4
data/bin/hello-hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hello-hola'
4
+ puts HelloHola.hi(ARGV[0])
@@ -0,0 +1,16 @@
1
+ class HelloHola::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 'cola'
11
+ 'Hello Hola'
12
+ else 'english'
13
+ 'Hello World!!'
14
+ end
15
+ end
16
+ end
data/lib/hello-hola.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class HelloHola
2
- def self.hi
3
- puts "Hello world!"
2
+ def self.hi(language = 'english')
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
6
  end
7
+
8
+ require 'hello-hola/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hello-hola
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Sterjakov
@@ -12,11 +12,14 @@ date: 2013-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: sterjakov@bk.ru
15
- executables: []
15
+ executables:
16
+ - hello-hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - lib/hello-hola.rb
21
+ - lib/hello-hola/translator.rb
22
+ - bin/hello-hola
20
23
  homepage: http://rubygems.org/gems/hello-hola
21
24
  licenses:
22
25
  - MIT