hola_aghyad 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hola_aghyad.rb CHANGED
@@ -1,5 +1,8 @@
1
+ require 'hola_aghyad/translator'
2
+
1
3
  class HolaAghyad
2
- def self.hi
3
- puts "<<< Hello .. this is my first gem's output!!! >>>"
4
- end
4
+ def self.hi(language = "english")
5
+ translator = Translator.new(language)
6
+ puts translator.hi
7
+ end
5
8
  end
@@ -0,0 +1,14 @@
1
+ class HolaAghyad::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_aghyad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,6 +18,7 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - lib/hola_aghyad.rb
21
+ - lib/hola_aghyad/translator.rb
21
22
  homepage: http://rubygems.org/gems/hola_aghyad
22
23
  licenses: []
23
24
  post_install_message: