hola_kawayama 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: 781cdee0d5af402ff064ce49bb49e214e16b61cd
4
- data.tar.gz: a326d651a0195cb05b339d5e764e30c765dbf17b
3
+ metadata.gz: 392039067a618b714cef49bc80715a2997e17461
4
+ data.tar.gz: e6af1e7e975cc2a089f170229bf403e811e12b4a
5
5
  SHA512:
6
- metadata.gz: c772174c9505d21a22b01a4942ad09ee7c3caf34ba41477790e5fc0e12d085a21b876aadc81ad9d37283b821efc1f5cf538ac0d4bb986f52d448ee780fc19c20
7
- data.tar.gz: e56ddd051e4d91ee904d11dafcfe44c927f0903e12ccadc9c4db50114fab14f6789f7e132d3233b9a1e1c58f8ee517a5e54df569ec4c57c1259ed569e632632f
6
+ metadata.gz: 7f22053db22480de33dea87916f910bfce6e7695ae40b16363cdbd7fa21315aabe193aa98f118d52bb6612e1858366f31ddf56de6bb256280ead63a615acc4a5
7
+ data.tar.gz: acb9c34a14bb3dfc5dfa75f3a435192638c9f6c770d0fc7ba55da4c935d09be3519d256310f08ecc5532bd24e75b8cd74a1b34e0b3618c9b012f6df779e0276c
data/bin/hola_kawayama ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_kawayama'
4
+ puts Hola.hi(ARGV[0])
data/lib/hola_kawayama.rb CHANGED
@@ -1,5 +1,8 @@
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_kawayama/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_kawayama
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
  - Tomoki Kawayama
@@ -12,11 +12,14 @@ date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: a1412tk@aiit.ac.jp
15
- executables: []
15
+ executables:
16
+ - hola_kawayama
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - bin/hola_kawayama
19
21
  - lib/hola_kawayama.rb
22
+ - lib/hola_kawayama/translator.rb
20
23
  homepage: http://rubygems.org/gems/hola_kawayama
21
24
  licenses:
22
25
  - MIT