hola_fuchi 0.0.1 → 0.0.3

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: f671682d30a1d2a01c7b3681bbea0d23339436ab
4
- data.tar.gz: b249de0943819025727f1c1424752b20d81582ed
3
+ metadata.gz: 2c2119605643b426afe30f2a64378a6df867b3df
4
+ data.tar.gz: ec92d8a318fc4daf3b5423d2f02ce4505ca9dd8e
5
5
  SHA512:
6
- metadata.gz: 624183bf7b4f1dffb9c53a719b7ba93c538e25a39a67d54045c777b42495c07f1e5af43da17b7bad9b386ce8b4d929f7bef72fc845c06c5e89d905c3e636b740
7
- data.tar.gz: 5c6c0c7c9b2d9a4029fd9edaddab19fc570e4b776f84a3222783636d088c9d70080cfe6b6db518604d202d1c4b775c7f66828d197e54384313c5b980f761ca30
6
+ metadata.gz: 442b421d37af2fdcd70278bd14c265fcb6c40ebc0c5d6cfd2c55b59c9a1312e6eed8e5a2d00f3780a0b3459b93b41196d1d5f41cc715c311eb4f05a368be8137
7
+ data.tar.gz: 9675abc36c680ae2cee12eca61642dfc1d7b6e20fd0ef8e078ecc5266d32f1426e4cff1b4c83bcbc1d9212b06963af5036a4db569e867eb2dfa681b7cf698607
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_fuchi'
4
+ puts Hola.hi(ARGV[0])
@@ -1,5 +1,18 @@
1
+ # The main Hola driver
1
2
  class Hola
2
- def self.hi
3
- puts "Hello world!"
3
+ # Say hi to the world!
4
+ #
5
+ # Example:
6
+ # >> Hola.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_fuchi/translator'
@@ -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_fuchi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yang Fuchi
@@ -12,11 +12,14 @@ date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem on aiit lecture.
14
14
  email: a14z8fy@aiit.ac.jp
15
- executables: []
15
+ executables:
16
+ - hola_fuchi
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_fuchi
19
21
  - lib/hola_fuchi.rb
22
+ - lib/hola_fuchi/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_fuchi
21
24
  licenses:
22
25
  - MIT