holaaaa 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,8 @@
1
1
  class Holaaaa
2
- def self.hi
3
- puts "Hello world!!"
2
+ def self.hi(language = :english)
3
+ translator = Translator.new(language)
4
+ puts translator.hi
4
5
  end
5
6
  end
7
+
8
+ require 'holaaaa/translator'
@@ -0,0 +1,16 @@
1
+ class Holaaaa::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when :spanish
9
+ "hola mundo"
10
+ when :japanese
11
+ "konnichiwa"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holaaaa
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 0
10
- version: 0.0.0
9
+ - 1
10
+ version: 0.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - t11a
@@ -29,6 +29,7 @@ extra_rdoc_files: []
29
29
 
30
30
  files:
31
31
  - lib/holaaaa.rb
32
+ - lib/holaaaa/translator.rb
32
33
  has_rdoc: true
33
34
  homepage: ""
34
35
  licenses: []