dfmoreto_hola 0.0.0 → 0.0.1

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: 23601dc6991a095dd56f92969368de8705620bda
4
- data.tar.gz: b535063e2f14a8cdd5166afd857661bad8c857d7
3
+ metadata.gz: a0285c6298408c1a0fd36d22b3df9cd9ae00ce29
4
+ data.tar.gz: fbc009e67393464dd3e13ff569c6e276bdb2807a
5
5
  SHA512:
6
- metadata.gz: ed4e000b33080cebe386f486da0f5ebc1390d38c8b3028c72eba417a5863d201b1ed67901a239ed004df15dee39ed815f9cf805db5bba717581f64c66631f9ea
7
- data.tar.gz: af7ce2f77ab52d99247b7852c8f76be03273156cf8a16cfe79357efeb8621c9893f7ab29fdafb05bc065dfbf61058cbbd396c8013dfd3004cd000dd4a5ed193b
6
+ metadata.gz: 733308e7513e6c042de4d01a86dd7f40e5d12b1c8231885ef51fe089714763b0b6d1af7251aea460f97cde56a2e0ab406b2620a3fd9a2cfe1b452916060268d9
7
+ data.tar.gz: 6033e43ca6618c04d877e72023ce8144839c87c403918f316dedbb18aebaf65689c2440da03e036381f9ecdf8f808599b399ce1d4746b6f1431e6137be3afd73
data/bin/hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola'
4
+ puts Hola.hi(ARGV[0])
@@ -0,0 +1,15 @@
1
+ class Hola::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+
7
+ def hi
8
+ case @language
9
+ when "spanish"
10
+ "hola mundo"
11
+ else
12
+ "hello world"
13
+ end
14
+ end
15
+ end
data/lib/hola.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  class Hola
2
2
 
3
- def self.hi
4
- puts "Hello World!"
3
+ def self.hi(language = "english")
4
+ translator = Translator.new(language)
5
+ translator.hi
5
6
  end
6
7
 
7
8
  end
9
+
10
+
11
+ require 'hola/translator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dfmoreto_hola
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
  - Daniel Moreto
@@ -12,11 +12,14 @@ date: 2010-04-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: dfmoreto@gmail.com
15
- executables: []
15
+ executables:
16
+ - hola
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola
19
21
  - lib/hola.rb
22
+ - lib/hola/translator.rb
20
23
  homepage: http://rubygems.org/gems/dfmoreto_hola
21
24
  licenses:
22
25
  - MIT