hola_brian-davis 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 539825db65806b3aaeeae60e1eeb3accda1d18d6
4
- data.tar.gz: 2fb30d20dd6a008978e84546c646b8a1fea03c2a
3
+ metadata.gz: 60768c0978ef9b63832ef4e0f2da8b10addd47d5
4
+ data.tar.gz: 526a397824062319ac809e93cee7e1fbddc12c91
5
5
  SHA512:
6
- metadata.gz: 884fb415b5937a70e1e8f8ebbdb2184cd1ea239391b2f6d238e22e1bd6a9ebb354585455e616919b4ae8326b391d658526a1fb18f9932c5816f81bc559823362
7
- data.tar.gz: ee34af396e708bf3f0ace81c74a45d6728cebbbc271ba8c90650e4ac0ce7f0aec88537abb91be22bf70b572551ffe4f3cb1f66f8a3c098ada52c186e98a1f794
6
+ metadata.gz: 36c9be0a304ab0e2a2585d636f2bf252a950167ea8f629e17a0e88e32f83497b3c5df2affc80bfc9f11bc2dee80d0922f7ee99d369966e72da5d949eba1d683e
7
+ data.tar.gz: c1d55b9ef0b0f9884328da297c8b1303f143435c8d064e59f00ee2563f88166b37b9ebb4ade6ad8e88b24ae774afa01bf8812e1ce51862010ebf1084ae902331
data/bin/hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_brian-davis'
4
+ puts Hola.hi(ARGV[0])
@@ -0,0 +1,16 @@
1
+ class Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola todo el mundo"
10
+ when "french"
11
+ "bonjour tout le monde"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,8 @@
1
1
  class Hola
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 'hola_brian-davis/translator.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_brian-davis
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
  - Brian Davis
@@ -12,11 +12,14 @@ date: 2013-11-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: contact@briandavis.name
15
- executables: []
15
+ executables:
16
+ - hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - lib/hola_brian-davis.rb
21
+ - lib/hola_brian-davis/translator.rb
22
+ - bin/hola
20
23
  homepage: https://github.com/brian-davis
21
24
  licenses:
22
25
  - MIT