hola_harry 0.0.0 → 0.2.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: 862072d0a5b09fd28e93692a213075b03be7efec7a7c97231088f31f0429ffc9
4
+ data.tar.gz: 7f2dee2cab54bf6d5f451be4f5994eadba6df341480da53ab1a58ef9f04f3e16
5
5
  SHA512:
6
- metadata.gz: 55ac259a55a4817510654ea703ec5c11dbc31a04a1e0cf4657b9ffcfcd9b15a5b2f9f991efbaa168964edc852de5df42f5ebed168dcd34bcd38597244461cb7f
7
- data.tar.gz: 479d591ff1fe920d9f99b93e8a19959ef7a8256946b0076134e99cffd216b5cadb50c3865ed74b32586da016f0a339a21e68360881cefda4ecaa3f5341b8da7d
6
+ metadata.gz: 781a6630c3082bf9c0b329f4b1eb28066a868e4a44f9af03f0d2466e0539301fbbe60b1ee6b8d384c06a660a6083b5a6cb78d89fecae023dfdebb11df328650e
7
+ data.tar.gz: c0a1505ad6bbeaa5044330f744491eeed7994f6fc81f6619fa0a8d48a079d95405f6468b07558f1366c5bfc3792248da7d3ccb851d9e622e8376fee1cac9d08b
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.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Graham
@@ -13,12 +13,15 @@ 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
21
- homepage: https://rubygems.org/gems/hola_harry
23
+ - lib/hola_harry/translator.rb
24
+ homepage: https://github.com/harry-graham/hola_harry
22
25
  licenses:
23
26
  - MIT
24
27
  metadata: {}