hola_delta 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 +4 -4
- data/bin/hola_delta +4 -0
- data/lib/hola/translator.rb +18 -0
- data/lib/hola_delta.rb +15 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86930cf3c491aad774c36f3c4ca64a8af66d89ad
|
4
|
+
data.tar.gz: 36b6d289e3af193cbe7a09fc3c0b159daeda2bb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fdea25e0f973c04ebf06aa946418f22af48d658ccac8478af9699306ea2cdc190bb7f594969bcf9303c5550efd323bb10431b48eeece7112dbf0825cd6ae930
|
7
|
+
data.tar.gz: c469809ecb83ae732c8be1b8a666fe0c79fe1b253883a8b313af8119945e412c2267b575d8274dd653e4300f4d29c36671b039b4a247eaa0fc25625ebaa045e6
|
data/bin/hola_delta
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
class Hola_delta::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 "chinese"
|
11
|
+
"你好世界"
|
12
|
+
when "japanese"
|
13
|
+
"こんにちは世界"
|
14
|
+
else
|
15
|
+
"hello world"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/hola_delta.rb
CHANGED
@@ -1,5 +1,18 @@
|
|
1
|
+
# The main Hola_delta dirver
|
1
2
|
class Hola_delta
|
2
|
-
|
3
|
-
|
3
|
+
# Say hi to the world!
|
4
|
+
#
|
5
|
+
# Example:
|
6
|
+
# >> Hola_delta.hi("spanish")
|
7
|
+
# => hola mundo
|
8
|
+
#
|
9
|
+
# Arguments:
|
10
|
+
# language: (String)
|
11
|
+
|
12
|
+
def self.hi(language = "english")
|
13
|
+
translator = Translator.new(language)
|
14
|
+
translator.hi
|
4
15
|
end
|
5
16
|
end
|
17
|
+
|
18
|
+
require 'hola/translator'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hola_delta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- delta
|
@@ -12,11 +12,14 @@ date: 2013-11-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
13
13
|
description: A simple hello world gem
|
14
14
|
email: delta4d@gmail.com
|
15
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- hola_delta
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
19
20
|
- lib/hola_delta.rb
|
21
|
+
- lib/hola/translator.rb
|
22
|
+
- bin/hola_delta
|
20
23
|
homepage: http://rubygems.org/gems/hola_delta
|
21
24
|
licenses:
|
22
25
|
- MIT
|