another_hola 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: 444fb784c51bed33c47f2de1393a19f77e5f8048
4
- data.tar.gz: 391aa7f87af46993fd37079962c4cb42378d721a
3
+ metadata.gz: 0acbcaece33e671b74a9521f622c495f2bf8ce0d
4
+ data.tar.gz: 7ea23bc06fdec5eb0b9667a16837d2a22264a5af
5
5
  SHA512:
6
- metadata.gz: b40c98475e5bd98ad92f657b32dadf39a7e17291e8676e9de3b451fdb5d7f3476926b28041c3b64e422002c3c398fd2cbf3ebc9c83a94004f88707549fd38dbb
7
- data.tar.gz: 5ea509bec21601826a1d74a58c39517a3aeeff84062ebd35de699451a8b339911ab71ff2d51fc31b6d3b193d74f30ae6f13393e685d9bb6f3d60f9fe42088274
6
+ metadata.gz: 7b8f479d7d4dbe121a49d2ee7840fabac66aa1b0c9975fd2159f8f4d53490ffb03f26ac6bc762c7aad699c9bbc69129bae42dba3af8a1b19aefb00e331d80869
7
+ data.tar.gz: 77f4b6fadf71f07bbf4d752a9642b41a5563c95888f6aedf73e92b07a64e0855bd24ae65d50adcdb2bf2684319c16b5ee602ce11ab2acef82e96c71c26de588d
data/bin/another_hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'another_hola'
4
+ puts AnotherHola.hi(ARGV[0])
data/lib/another_hola.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class AnotherHola
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 'another_hola/translator'
@@ -0,0 +1,14 @@
1
+ class AnotherHola::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: another_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
  - Salsabila Nadhifah
@@ -12,11 +12,14 @@ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem following hola gem
14
14
  email: salsanads@gmail.com
15
- executables: []
15
+ executables:
16
+ - another_hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/another_hola
19
21
  - lib/another_hola.rb
22
+ - lib/another_hola/translator.rb
20
23
  homepage:
21
24
  licenses:
22
25
  - MIT