hola001 0.0.0 → 0.0.2

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: 5c6d57083807c9e110796ee464a05ed198f4ffd9
4
- data.tar.gz: f0db39e7504938c3b193ff142e219a047d6a24c6
3
+ metadata.gz: 92966c071193d24c5ddd0da36a44d917227d03df
4
+ data.tar.gz: 2a4ca2dbc97aecd5ef37c8e8b9d5221e3fd5d592
5
5
  SHA512:
6
- metadata.gz: baca67fd8b457b7171fb049b0badf6dd9a4fcff9474863a2713f07ece907437976ae5930f6f6560c239545c2b415220fa950d7a66f770e44efa92f83857e6586
7
- data.tar.gz: f71a722421ec448b870ca6c2f7b1404997b52c12456e169427f99faf39d92c537c9b8250e9e87cce246059c0713a0f5d2cc45c8dd50422f0d211d5a1749975e5
6
+ metadata.gz: b678c44e602c3c2dec49f82d4eccb28885e4156045fb02c893325244b0c5f744f8629a78e06e3dc1ba2cb888db3e26b5fadfde099dac9ee72edfbe3d29024521
7
+ data.tar.gz: 12e9aad2c3ab52809d02d30808df30f3c007ca189b48d6d92753c6e9df10101b31d5ddb433b87b4efcbe870ffea1743e125e1e62cb8214f35b53af3f9108cadf
data/bin/hola001 ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola001'
4
+ puts Hola001.hi(ARGV[0])
@@ -0,0 +1,14 @@
1
+ class Hola001::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola001 mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
data/lib/hola001.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class Hola001
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 'hola001/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola001
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - friedrich.lam@gmail.com
@@ -12,11 +12,14 @@ date: 2019-12-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: friedrich.lam@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola001
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - lib/hola001.rb
21
+ - lib/hola001/translator.rb
22
+ - bin/hola001
20
23
  homepage: https://rubygems.org/gems/hola001
21
24
  licenses:
22
25
  - MIT
@@ -40,5 +43,5 @@ rubyforge_project:
40
43
  rubygems_version: 2.0.14.1
41
44
  signing_key:
42
45
  specification_version: 4
43
- summary: Hola!
46
+ summary: Hola001!
44
47
  test_files: []