hola_alek_brantley 0.0.0 → 0.1.0

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_alek_brantley'
4
+ puts Hola.hi(ARGV[0])
@@ -1,5 +1,9 @@
1
+ require 'hola_alek_brantley/translator'
2
+
1
3
  class Hola
2
- def self.hi
3
- puts "Hello world!"
4
+ def self.hi(language="english")
5
+ translator = Translator.new(language)
6
+ translator.hi
4
7
  end
5
8
  end
9
+
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_alek_brantley
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,11 +14,14 @@ date: 2013-10-22 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: A simple hello world gem
16
16
  email: alekbrantley@gmail.com
17
- executables: []
17
+ executables:
18
+ - hola_alek_brantley
18
19
  extensions: []
19
20
  extra_rdoc_files: []
20
21
  files:
21
22
  - lib/hola_alek_brantley.rb
23
+ - lib/hola_alek_brantley/translator.rb
24
+ - bin/hola_alek_brantley
22
25
  homepage: http://rubygems.org/gems/hola_alek_brantley
23
26
  licenses:
24
27
  - DBC