hola_harry 0.0.0 → 0.1.0

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
  SHA256:
3
- metadata.gz: 5177e4d61a0bd6680078a99cb729f6895cd57d492ee01a97bd0bd4b7e661174a
4
- data.tar.gz: 183d0889590f74202f2118e17adae42cd2576d234bb7e31a4c74e535dfd55f80
3
+ metadata.gz: c07b0861a5f82b5a58da55637508fa8613897e2a179cc18babe9bd7cd1598af5
4
+ data.tar.gz: 62ee3329247e4426b3f21c5550f1fc883b3fe3a3cadc8a6ce60eff88ef5f1bc9
5
5
  SHA512:
6
- metadata.gz: 55ac259a55a4817510654ea703ec5c11dbc31a04a1e0cf4657b9ffcfcd9b15a5b2f9f991efbaa168964edc852de5df42f5ebed168dcd34bcd38597244461cb7f
7
- data.tar.gz: 479d591ff1fe920d9f99b93e8a19959ef7a8256946b0076134e99cffd216b5cadb50c3865ed74b32586da016f0a339a21e68360881cefda4ecaa3f5341b8da7d
6
+ metadata.gz: b99606f42a6703174bb72d0c1544f1e6681338ecc2f8ee2e772e4b3c9cfdfee83899ca865ec85fe90ae9773d7c3a3b9965c48b45e7dda94d2690ad0a7a0568ea
7
+ data.tar.gz: 0d24a6bfeeb05e8ea550784969b49b61e151f235fb41dfc55b5c3ad10169226b421a5de2c81799b2c194329e6a40b5679e97164bd781100db8b7843887d1c6da
data/bin/hola_harry ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_harry'
4
+ puts HolaHarry.hi(ARGV[0])
@@ -0,0 +1,14 @@
1
+ class HolaHarry::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
data/lib/hola_harry.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  class HolaHarry
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_harry/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_harry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Graham
@@ -13,11 +13,14 @@ dependencies: []
13
13
  description: A simple 'hello world' gem created following the RubyGems 'make your
14
14
  own gem' guide.
15
15
  email: harry.graham.595@gmail.com
16
- executables: []
16
+ executables:
17
+ - hola_harry
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
21
+ - bin/hola_harry
20
22
  - lib/hola_harry.rb
23
+ - lib/hola_harry/translator.rb
21
24
  homepage: https://rubygems.org/gems/hola_harry
22
25
  licenses:
23
26
  - MIT