hola_tl 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1d861a5e6a28d4be7805bd819e43a563ac946a7defbd0caccae19b17aaa41879
4
+ data.tar.gz: 253b2533e1163c7d6061167551778782d0e62256bf153abb3c429a2fe57b72aa
5
+ SHA512:
6
+ metadata.gz: e3567c8c7ced6da05f4703c86102c280a4d8cd69b549c09cff1a179c3e93d738800cef3496a6c4167cff9554eb75f5f2928aca596fd7aba50324f394b0887e6f
7
+ data.tar.gz: d108359caf369e9871fec7170c9b1a25bfba3877fff85d570b07076c913948dbeaa7f3195c4deffa0cd8a05afc57d4d8fe0300a8ddf094153c8b1e2ecc32c703
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
data/bin/hola_tl ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola'
4
+ puts Hola.hi(ARGV[0])
@@ -0,0 +1,22 @@
1
+ class Translator
2
+ def initialize(language = "english")
3
+
4
+ puts("aaa")
5
+
6
+ @language = language
7
+ end
8
+
9
+ def hi
10
+
11
+ puts("hi")
12
+
13
+ case @language
14
+ when "spanish"
15
+ "hola mundo"
16
+ when "korean"
17
+ "anyoung ha se yo"
18
+ else
19
+ "hello world"
20
+ end
21
+ end
22
+ end
data/lib/hola_tl.rb ADDED
@@ -0,0 +1,32 @@
1
+ class Hola_tl
2
+ def self.hi(language)
3
+ # translator = Translator.new(language)
4
+ # translator.hi()
5
+
6
+ Test.new(language).hi()
7
+ # test.hi()
8
+ end
9
+ end
10
+
11
+ class Test
12
+
13
+ def initialize(language = "english")
14
+
15
+ puts(language)
16
+ @language = language
17
+ end
18
+
19
+
20
+ def hi
21
+ puts(@language)
22
+ end
23
+
24
+ end
25
+
26
+
27
+ require 'hola_tl/translator'
28
+
29
+ Hola_tl.hi("tl")
30
+
31
+
32
+
data/test/test_hola.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'hola'
3
+
4
+ class HolaTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", Hola.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello world", Hola.hi("ruby")
11
+ end
12
+
13
+ def test_spanish_hello
14
+ assert_equal "hola mundo", Hola.hi("spanish")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hola_tl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nick Quaranto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2010-04-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple hello world gem
14
+ email: nick@quaran.to
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Rakefile
20
+ - bin/hola_tl
21
+ - lib/hola_tl.rb
22
+ - lib/hola_tl/translator.rb
23
+ - test/test_hola.rb
24
+ homepage: http://rubygems.org/gems/hola_tl
25
+ licenses: []
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubygems_version: 3.1.4
43
+ signing_key:
44
+ specification_version: 3
45
+ summary: Hola!
46
+ test_files:
47
+ - test/test_hola.rb