hola_dancb 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 427a36e93565d0b759e172bc7127cd384ef833f9
4
- data.tar.gz: 9942974a158448c8123faabc58846a4ab6c5ba2c
3
+ metadata.gz: c0d3b8822f38f697c37f642ea74bd692fb307eb1
4
+ data.tar.gz: 484c2b1f9e8f1ceb0ea00fd48ff675f90dbdfd75
5
5
  SHA512:
6
- metadata.gz: 8edcc6dab847bc52bb1fe312b370d02aa6557344c379681e016774af8454f2aa14f1be02278d3972312a25f71ec8ebbeba10887bc442b045fc5a7b317072b06f
7
- data.tar.gz: cf90f5e798f337833cd9174222738b135a451f8c74129c398db2fd260da9148213e95f434332f1adec89770b0dee4107e5e8048c0dbef00c12a12cd0765bcb1f
6
+ metadata.gz: 30901dc09a805f0e2d41e48a7d06d5ef71c3d525864d153a302e91feeff8a68e3fa6fc4d1d200296a49c43cb30c9be2b2b182f71c32b16748a0af02648ceef48
7
+ data.tar.gz: 476a66b68364ebc78c811e0dd8f5b1712afc6778add98952c9ec7b1f012e6425b855d2cf7eef32673c22a90f1fd28a8ed73dcc3d68b65ef10d83de2feee7f09b
data/bin/hola_dancb ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_dancb'
4
+ puts Hola.hi(ARGV[0])
data/lib/hola_dancb.rb CHANGED
@@ -1,5 +1,8 @@
1
- class HolaDan
2
- def self.hi
3
- puts "Gem world!"
1
+ class Hola
2
+ def self.hi(language = "english")
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
- end
6
+ end
7
+
8
+ require 'hola_dancb/translator'
@@ -0,0 +1,14 @@
1
+ class Hola::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_dancb
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
  - Dan Bota
@@ -12,11 +12,14 @@ date: 2018-10-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Just another simple hello world gem!
14
14
  email: dan.cristian.bota@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola_dancb
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_dancb
19
21
  - lib/hola_dancb.rb
22
+ - lib/hola_dancb/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_dancb
21
24
  licenses:
22
25
  - MIT