aloha 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.
Files changed (4) hide show
  1. data/bin/aloha +4 -0
  2. data/lib/aloha.rb +5 -2
  3. data/lib/aloha/translator.rb +15 -0
  4. metadata +5 -2
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'aloha'
4
+ puts Aloha.hi(ARGV[0])
@@ -1,5 +1,8 @@
1
1
  class Aloha
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 'aloha/translator'
@@ -0,0 +1,15 @@
1
+ class Translator
2
+ def initialize(language)
3
+ @language=language
4
+ end
5
+
6
+
7
+ def hi
8
+ case @language
9
+ when "french"
10
+ "Bonjour monde"
11
+ else
12
+ "hello world"
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aloha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,14 @@ date: 2013-08-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple hello world gem
15
15
  email: vijay.gopal.c@gmail.fr
16
- executables: []
16
+ executables:
17
+ - aloha
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/aloha.rb
22
+ - lib/aloha/translator.rb
23
+ - bin/aloha
21
24
  homepage: http://rubygems.org/gems/aloha
22
25
  licenses:
23
26
  - MIT