hola_caonayemi 0.0.0 → 0.0.1

This diff has not been reviewed by any users.
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: 2b6cda5ed84c2589b46f1a8447163bb03d0244dc
4
- data.tar.gz: 1409fb2224c708d5e403e9be37e4da48d4101c61
3
+ metadata.gz: 14b1128be3f97316325ccd0796648fa79401718a
4
+ data.tar.gz: 98a59978a9d394c4320679bb2549e3863d26c72d
5
5
  SHA512:
6
- metadata.gz: 4e412a538881192857a3a4b568ae176225bcd7e873869685f7e8eaca0ad6e5801fde9adbcd4379c696a32fca5e539ec838f27ced53585af68aeb8e5c1916e41e
7
- data.tar.gz: 2650626148869e96bd983e944ba98a9ca4ee0ac2bde15fdd738e986e340677a64df52469323f38baa64d4a62168cfa508487f94c8c22595922374707b1cf0816
6
+ metadata.gz: 99f40092417e1944f2bb801c67f83e4ab43792e6c3e19c51b2c004e83a1f916b37ff956e7732d7aacb362b0c6e429b6286b3595dd99b9126d908bde1f7f9d3f1
7
+ data.tar.gz: 7b78d1a993960efe69388bed5ac9eb53823d8ad517890b3e10ee59efeb7c5150e28f986af914033372edc5e4cd45b4577ddd0c178013e8bc1146e967a8e4351c
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_caonayemi'
4
+ puts Hola.hi(ARGV[0])
@@ -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_caonayemi/translator'
@@ -0,0 +1,14 @@
1
+ class Hola::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: hola_caonayemi
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
  - Christine Onayemi
@@ -12,11 +12,14 @@ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple 'hello world' gem
14
14
  email: caonayemi@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola_caonayemi
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_caonayemi
19
21
  - lib/hola_caonayemi.rb
22
+ - lib/hola_caonayemi/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_caonayemi
21
24
  licenses:
22
25
  - MIT