hola-iuhoay 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ *.gem
@@ -0,0 +1,12 @@
1
+ require File.expand_path("../lib/hola/version", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'hola-iuhoay'
5
+ s.version = Hola::VERSION
6
+ s.summary = "Hola!"
7
+ s.description = "A simple hello world gem"
8
+ s.authors = ["iuhoay"]
9
+ s.email = "charsky.wu@gmail.com"
10
+ s.files = `git ls-files`.split("\n")
11
+ s.homepage = "https://github.com/iuhoay/hola-iuhoay"
12
+ end
@@ -1,5 +1,8 @@
1
- class Hola
2
- def self.hi
3
- puts "Hello world"
4
- end
5
- end
1
+ class Hola
2
+ def self.hi(language = 'chinese')
3
+ translator = Translator.new(language)
4
+ puts translator.hi
5
+ end
6
+ end
7
+
8
+ require "hola/translator"
@@ -0,0 +1,15 @@
1
+ # encoding=utf-8
2
+ class Hola::Translator
3
+ def initialize(language)
4
+ @language = language
5
+ end
6
+
7
+ def hi
8
+ case @language
9
+ when :english
10
+ "hello world"
11
+ else
12
+ "欢迎欢迎,好久不见"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module Hola
2
+ VERSION = '0.0.4'
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola-iuhoay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
12
+ date: 2012-06-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple hello world gem
15
15
  email: charsky.wu@gmail.com
@@ -17,7 +17,11 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - .gitignore
21
+ - hola-iuhoay.gemspec
20
22
  - lib/hola.rb
23
+ - lib/hola/translator.rb
24
+ - lib/hola/version.rb
21
25
  homepage: https://github.com/iuhoay/hola-iuhoay
22
26
  licenses: []
23
27
  post_install_message: