cw 0.0.12 → 0.1.0
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 +4 -4
- data/.codeclimate.yml +15 -0
- data/.travis.yml +6 -0
- data/README.md +60 -9
- data/cw.gemspec +1 -1
- data/daily.rb +2 -2
- data/example.rb +0 -2
- data/lib/cw/audio_player.rb +3 -1
- data/lib/cw/book.rb +22 -14
- data/lib/cw/book_details.rb +3 -3
- data/lib/cw/cw_encoding.rb +67 -51
- data/lib/cw/print.rb +24 -19
- data/lib/cw/repeat_word.rb +1 -6
- data/lib/cw/rss.rb +1 -1
- data/lib/cw/stream.rb +29 -17
- data/lib/cw/test_letters.rb +1 -15
- data/lib/cw/test_words.rb +1 -14
- data/lib/cw/tester.rb +16 -0
- data/lib/cw/tone_generator.rb +4 -4
- metadata +3 -52
- data/data/text/tom_sawyer.txt +0 -6477
- data/lib/cw/monitor.rb +0 -36
data/lib/cw/monitor.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
# class Monitor
|
4
|
-
|
5
|
-
class monitor
|
6
|
-
|
7
|
-
attr_accessor :quit
|
8
|
-
|
9
|
-
def initialize cw
|
10
|
-
@cw = cw
|
11
|
-
end
|
12
|
-
|
13
|
-
def cw
|
14
|
-
@cw
|
15
|
-
end
|
16
|
-
|
17
|
-
def monitor_keys
|
18
|
-
str = ' '
|
19
|
-
chr = ''
|
20
|
-
loop do
|
21
|
-
begin
|
22
|
-
system("stty raw -echo")
|
23
|
-
chr = STDIN.getc
|
24
|
-
#input_file.print chr
|
25
|
-
str[0] = str[1]
|
26
|
-
str[1] = chr
|
27
|
-
quit = true if str == 'qq'
|
28
|
-
@entered_word << chr
|
29
|
-
check_match
|
30
|
-
ensure
|
31
|
-
system("stty -raw echo")
|
32
|
-
end
|
33
|
-
break if @quit == true
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|