taxi 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.
- data/bin/taxi +5 -0
- data/lib/korean.txt +5666 -0
- data/lib/taxi.rb +32 -0
- metadata +48 -0
data/lib/taxi.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'Growl'
|
3
|
+
|
4
|
+
class Taxi
|
5
|
+
def initialize
|
6
|
+
@words = Array.new
|
7
|
+
load_language_files
|
8
|
+
100.times.each do
|
9
|
+
display_random_word
|
10
|
+
sleep(5)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def load_language_files
|
16
|
+
dir = File.expand_path(File.dirname(__FILE__))
|
17
|
+
f = IO.readlines(dir + "/korean.txt")
|
18
|
+
count = f.count
|
19
|
+
|
20
|
+
for i in 0...count do
|
21
|
+
@words << f[i]
|
22
|
+
end
|
23
|
+
return @words
|
24
|
+
end
|
25
|
+
|
26
|
+
def display_random_word
|
27
|
+
title = "Korean"
|
28
|
+
message = @words[Random.rand(@words.count)]
|
29
|
+
|
30
|
+
Growl.notify { self.title = title; self.message = message; self.sticky! }
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: taxi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Revell
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-17 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: A gem to learn a new language
|
15
|
+
email: mikearevell@gmail.com
|
16
|
+
executables:
|
17
|
+
- taxi
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/taxi.rb
|
22
|
+
- lib/korean.txt
|
23
|
+
- bin/taxi
|
24
|
+
homepage: http://github.com/mars2686/Taxi
|
25
|
+
licenses: []
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 1.8.10
|
45
|
+
signing_key:
|
46
|
+
specification_version: 3
|
47
|
+
summary: Taxi
|
48
|
+
test_files: []
|