hola_ancientalex 0.0.0 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_ancientalex'
4
+ puts Hola.hi(ARGV[0].to_sym)
@@ -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
@@ -1,5 +1,9 @@
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_ancientalex/translator'
9
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_ancientalex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,15 +9,18 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple hello world gem for ancientalex
15
15
  email: davidmichaelhahn@gmail.com
16
- executables: []
16
+ executables:
17
+ - hola_ancientalex
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/hola_ancientalex.rb
22
+ - lib/hola_ancientalex/translator.rb
23
+ - bin/hola_ancientalex
21
24
  homepage: http://rubygems.org/gems/hola_ancientalex
22
25
  licenses: []
23
26
  post_install_message: