shuang_pin_tutorial 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shuang_pin_tutorial/handler.rb +1 -0
- data/lib/shuang_pin_tutorial/main.rb +2 -1
- data/lib/shuang_pin_tutorial.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9488d21afdc29e4f4cbb81f876fe012e696f8b7038d48c219b8e178acbfa5e85
|
4
|
+
data.tar.gz: cb2b1e0bbc86e5d66351de5ff755b7115f30ed9f70d3a6e168fc283168c57cbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3d9517f3da47e13ab26304b4709388552e447e54cd2d929d7a455ace63448604802406af5b0b94ba8155e4b12a0d522e3a6e23cb99907c93489bfab36e378c
|
7
|
+
data.tar.gz: 06150b71520a9a34c100aa663a72b727ccdf2e385882d517c2e3ca511a5ab0b5db98a03bf7679c8d093b48768161d950e06f5cfd07687308c8f8f5e4e932de67
|
@@ -10,6 +10,7 @@ module ShuangPinTutorial
|
|
10
10
|
class Handler
|
11
11
|
def initialize(options)
|
12
12
|
@int_words_displayed = options && options.key?(OPTIONS[:w]) ? options[OPTIONS[:w]].to_i : OPTIONS_DEFAULT[:w] # integer
|
13
|
+
raise ArgumentError.new('請輸入有效顯示字數數目(>0)') unless @int_words_displayed > 0
|
13
14
|
@is_enable_reminder = options && options.key?(OPTIONS[:r]) ? !options[OPTIONS[:r]] : OPTIONS_DEFAULT[:r] # boolean(reverse)
|
14
15
|
@is_display_zhuyin = options && options.key?(OPTIONS[:z]) ? !options[OPTIONS[:z]] : OPTIONS_DEFAULT[:z] # boolean(reverse)
|
15
16
|
@is_display_cword = options && options.key?(OPTIONS[:c]) ? !options[OPTIONS[:c]] : OPTIONS_DEFAULT[:c] # boolean(reverse)
|
@@ -17,9 +17,10 @@ module ShuangPinTutorial
|
|
17
17
|
rescue Exception => ex
|
18
18
|
$stderr.puts('執行時發生錯誤哦,信息在下面:')
|
19
19
|
$stderr.puts(ex.message)
|
20
|
-
$stderr.puts(ex.backtrace)
|
20
|
+
# $stderr.puts(ex.backtrace) # debug use only
|
21
21
|
@is_run_success = false
|
22
22
|
ensure
|
23
|
+
exit(@is_run_success) unless @is_run_success
|
23
24
|
$stdout.puts('訓練時間:')
|
24
25
|
$stdout.puts(@obj_tutorial.get_total_time_str)
|
25
26
|
$stdout.puts('成果統計:')
|
data/lib/shuang_pin_tutorial.rb
CHANGED
@@ -14,7 +14,7 @@ end
|
|
14
14
|
module ShuangPinTutorial
|
15
15
|
MODULE = "ShuangPinTutorial"
|
16
16
|
NAME = "shuang_pin_tutorial"
|
17
|
-
VERSION = "1.2.
|
17
|
+
VERSION = "1.2.2"
|
18
18
|
OPTIONS = {w: "words", r: "remind_off", z: "zhuyin_off", c: "cword_off"}
|
19
19
|
OPTIONS_DEFAULT = {w: 6, r: true, z: true, c: true}
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shuang_pin_tutorial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David N
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|