hola_ali 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzQzMDNkYWUwZWE5MzE3OTdiMjc4MTFhMDc0OTUyNjgyYTNkNjVmNw==
4
+ MTI3MDhlYmUxMTljNGY1MmEyZjlkZDhhNzI5ZmI4MWMyZGE5NDI1OQ==
5
5
  data.tar.gz: !binary |-
6
- YWI2ODgzZDYzMmMyNGQyM2EwYTE5NThhMTE5YTVkOGQ2OGM5NmMzNw==
6
+ YzRmNDI2NGM2MTAxZWI3OTNlNzYwZmU1NzZjMDMxODFlNWIzMmYyZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTgyMzc4NjA2MzcxYjcxODA5ZWU0NzgyNjNhOTE4NzI0MzQ0Y2UwN2Q1MDM4
10
- ZjNmYWVhYmRjNjNkZTNiMTI4MGVjYTg4OTBiZDczZTdmZWU4OGFkZmIxNTAx
11
- MmJhYWQ2MzRhZTBlOTUxOWM5MDcyY2QyNTJiZTUyODYwYzFkNmQ=
9
+ ZmI4YTNlZDI5NmU2ODQxOTI4N2QxMGRiNmI5ZjM4NWRlZTQ1N2Y3NTJhYmNm
10
+ ZDEyZmYxMTY2Mzg2MmYyNWQ4MDVjMzk5NTAwZTEyMzdhOTk0YWNkNTc5MzUy
11
+ YTRkNTEyNGQwMzNjN2JiYTM0M2QwMGVlZTVkMTM2YjQwNTQ4Y2M=
12
12
  data.tar.gz: !binary |-
13
- NjllOWZjODg0YjE1YmQ2NTJhMjQ1ZTk2M2FiMzEzMTY0MGZhNTY5MzVlNzYy
14
- NzgxNmVhMzUyODkzZWQ5OGNkMTgyYzc0MWU0N2ZlMTNiNzVhYzBhYTZiOGY5
15
- NWQzZWIyNWU2YTA4MTUyYmI2YzUwZWEzN2EyNGQ1YTUwNmYyZGE=
13
+ ZGZiMjFhMGU4MjQ2NDZkNzA5MDU0YzlhYTFiOGYwM2RhMmM4NGFiNGRmNDU3
14
+ OTc5NTY1NmExN2IxZTE4OTY5MmFlNGM0OTg4MTk5MmVjNzc5OGQyZGVhM2Fk
15
+ ODNiYTVjMTU3YTUxNzVlZjFlZTE5OTY1MWZhMjg3NDI1YjE4ZWM=
@@ -0,0 +1,14 @@
1
+ class 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_ali.rb CHANGED
@@ -1,5 +1,8 @@
1
+ require 'hola_ali/translator'
2
+
1
3
  class HolaAli
2
- def self.hi_ali
3
- puts "Hello World!"
4
+ def self.hi_ali(language = "english")
5
+ translator = Translator.new(language)
6
+ translator.hi
4
7
  end
5
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_ali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Osm
@@ -17,6 +17,7 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/hola_ali.rb
20
+ - lib/hola_ali/translator.rb
20
21
  homepage: https://rubygems.org/gems/hola_ali
21
22
  licenses:
22
23
  - MIT